Forum Moderators: phranque
Addhandler application/x-httpd-php .shtml .php
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^index\.shtml$ test.shtml
RewriteRule ^abstractors-states-(.*)\.shtml$ /abstractors.shtml?states=%1 [r,nc]
Thanx & Regards:
Rajeev
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^index\.shtml$ /test.shtml [L]
RewriteRule ^abstractors-states-([^.]+)\.shtml$ /abstractors.shtml?states=$1 [NC,L]
RewriteRule ^abstractors-states-([^.]+)\.shtml$ [b]http://www.example.com[/b]/abstractors.shtml?states=$1 [NC,[b]R=301[/b],L]
Using an external 301 permanent redirect means that search engines will list abstractors.shtml?states=xyz as the URL, and fetch the content from there. This is OK, effciency-wise, but you end up with "ugly" and "unfriendly" URLs listed in search results.
Using an external 302 temporary redirect means that the search engines will list abstractor-states.xyz.shtml as the URL, but that both search engines and visitors will attempt to fetch the content from abstractor-states.xyz.shtml, receive the 302 redirect response from the server, and then have to make a second request to abstractors.shtml?states=xyz each and every time that resource is requested. This doubles the number of requests for those resources to your server, and slows down the page load time, since two HTTP transactions are required for each temporarily-redirected page.
I strongly advise using an internal rewrite to cause search engines to show the "static" or "search engine friendly" URL.
Jim