| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Old site was a Blog now we switched to a new CRM with clean URLS|
but now I can't redirect the old files. Need help with a Rewrite Rule.
| 8:27 pm on May 11, 2011 (gmt 0)|
Looking to rewrite ANY url with index.php in the begining to the homepage.
I tried this:
RewriteRule ^index.php(.*) http://www.example.com/ [R=301,L,QSA]
But it will not work. All it does it remove the index.php. How do i strip whatever is after index.php.
| 8:37 pm on May 11, 2011 (gmt 0)|
RewriteRule ^index.php$ http://example.com/? [R=301,L]
| 8:43 am on May 14, 2011 (gmt 0)|
You need to escape the literal period in the RegEx pattern.
Are you sure this rule doesn't create an infinite loop? Normally you need to test THE_REQUEST too.
Do you want this only in root? That's all it does so far.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved