Associate
- Joined
- 19 Jun 2003
- Posts
- 1,680
- Location
- West Yorks, UK
Hi all,
I've got a site with some heavy re-writing on it. For example, turning
into
However, it's been pointed out to me that someone entering
will get a 404. Hence, i've setup a rewrite rule of:
But, this doesn't take into account what happens when someone enters:
www.domainname.com/index.php (should go to www.domainname.com/)
Can i tweak the above mod_rewrite rule to make it redirect the homepage too?
Cheers,
Matt
I've got a site with some heavy re-writing on it. For example, turning
Code:
/index.php?category=electrical&product=Stereo&id=143
Code:
/electrical/stereo/143/
However, it's been pointed out to me that someone entering
Code:
/electrical/stereo/143/index.php
Code:
RewriteRule ^index.php$ / [L,R=301,QSA,NC]
But, this doesn't take into account what happens when someone enters:
www.domainname.com/index.php (should go to www.domainname.com/)
Can i tweak the above mod_rewrite rule to make it redirect the homepage too?
Cheers,
Matt