Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

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)

5+ Year Member

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)

5+ Year Member

problem solved.

RewriteRule ^index.php$ http://example.com/? [R=301,L]


8:43 am on May 14, 2011 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

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.