Link to home
Start Free TrialLog in
Avatar of Victor Kimura
Victor KimuraFlag for Canada

asked on

.htaccess 301 redirect index.php, index.html in subdomain

Hi,
I have this page for a client:
http://irrevocable-trust.ultratrust.com/

But when I use:
http://irrevocable-trust.ultratrust.com/index.php
http://irrevocable-trust.ultratrust.com/index.html

the page isn't found. I wish to use .htaccess to do a 301 redirect from
http://irrevocable-trust.ultratrust.com/index.php
to
http://irrevocable-trust.ultratrust.com/

I tried this:
RewriteRule ^index.php$ http://irrevocable-trust.ultratrust.com/ [R=301, L]

But it doesn't work.
I have this in the same .htaccess file for the subdomain like:
RewriteRule ^intentionally-defective-grantor-trust.html$ http://irrevocable-trust.ultratrust.com/irrevocable-trust-agreement.html [r=302]

and it works. So I don't know why this doesn't work:
RewriteRule ^index.php$ http://irrevocable-trust.ultratrust.com/ [R=301, L]

Thank you,
Victor
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial