Hi I'm trying to do a redirect from an index.html file in a subfolder to a new file index.php - can someone tell me how to do this please? i.e. www.mydomain.com/xyz/index.html needs to redirect to: www.mydomain.com/xyz/index.php Oh, I'm using apache so I need a RewriteRule Many thanks in advance
You should create (or modify) .htaccess file in xyz directory. Try to input there: RewriteEngine on RewriteRule ^index\.html /xyz/index\.php
Do you need to keep index.html? Why not just delete it? Otherwise just use rewrite rule in your root htaccess - RewriteRule ^xyz/index\.html$ http://www.yourdomain.com/xyz/index.php [R=301,L] Code (markup):
Oops! I just realised I made a slight mistake in my original post. I actually wanted a redirect from /xyz / to /xyz/index.php Thanks billybear you were spot on - Cheers