Digital Paint Discussion Board

Digital Paint Community => Other Stuff => Topic started by: lekky on August 11, 2008, 07:14:05 PM

Title: mod_rewrite
Post by: lekky on August 11, 2008, 07:14:05 PM
Struggling with mod_rewrite rules. I'll keep having a go, but if anyone knows how to write these would be a big help :P

Basically want to redirect any url in the form:

www.website.co.uk/index.php/*

to:

www.website.co.uk
Title: Re: mod_rewrite
Post by: KnacK on August 11, 2008, 07:58:16 PM
http://www.mod-rewrite-wizard.com/
maybe??
Title: Re: mod_rewrite
Post by: Zorchenhimer on August 12, 2008, 02:09:10 PM
You don't need a rewrite rule to do that, at least not if you do it right in "index.php".  For instance "http://www.zorchenhimer.com/?pg=pics" is really "http://www.zorchenhimer.com/index.php?pg=pics".  Unless you want "clean URLs" like Drupal does, in which case you will need to use some rewrite rules.
Title: Re: mod_rewrite
Post by: lekky on August 12, 2008, 06:34:23 PM
I have clean urls at the moment, eg http://www.indiereview.co.uk/reviews/

The problem is the old "clean" urls eg http://www.indiereview.co.uk/index.php/table/latest-reviews/ which are indexed on google. They go to a blank page so I need to rewrite anything index.php/* to go to my home page! Or even better to a custom 404 page explaining the link has changed.
Title: Re: mod_rewrite
Post by: lekky on August 12, 2008, 08:00:04 PM
ok, sorted with a little (lot) help from sk89q. A rewrite rule was added to direct everything in the bad form to the 404 page.