Forum Moderators: mack
Then I modify my htaaccess file with the following:
RedirectMatch permanent ^/index.htm/$ [mywebsite.com...]
Am I doing the right thing in terms of SEO or maintaining the rank and regularly crawling on my site? Need experts advise. Thanks
You could also forward index.php to domain.com
Er, no you couldn't. It would go into an endless loop.
What you've done is OK. It shouldn't hurt your search engine rankings. However, you'd be better off in many ways by using "friendly URLs".
Perhaps others here can help you with precisely how to do that with Wordpress.
It usually involves using mod_rewrite in conjunction with setting an option in the software (e.g. Wordpress).
Here's what I'm using (I got the code from this forum I think):
# index.html and index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.(html¦php)\ HTTP/
RewriteRule ^(([^/]*/)*)index\.(html¦php)$ http://www\.example\.com/$1 [R=301,L]
You'd need to change the ¦'s to solid pipes, this forum changes that character. Also be sure to test that the headers are really sending proper 301's and no loops if you try it.
I didn't have to change htaccess or any other files, just uploaded the .php site.
Typing www.example.com (fill in your domain) will pull up the HTM / HTML version of the index first, if that's not available it will pull up my index.php files.