Forum Moderators: phranque
RewriteRule ^sida1\.html$ index.html [R,NE,L]
RewriteRule ^sida1\.html$ index.html [R,NE,L]
RewriteRule ^sida2\.html$ index.html [R,NE,L]
RewriteRule ^sida3\.html$ index.html [R,NE,L]
The problem is that the first line (which could be any of the other redirects as well) needs to be there for it to work otherwise the RewriteRule ^sida1\.html$ index.html stops working - why is that - there is something that I'm missing here...
Also I would like these redirects to happen ONLY when the site is visited by browsers and NOT redirect when a search engine bot is crawling the site.
How would I go about doing that?
Would this work:
# Detects the major search engines
RewriteCond %{HTTP_USER_AGENT}!Googlebot¦Msnbot¦Slurp¦Jeeves [NC]
Thanks - would appreciate some help...
RewriteRule ^sida1\.html$ http://www.example.com/index.html [R=301,L]
RewriteRule ^sida2\.html$ http://www.example.com/index.html [R=301,L]
RewriteRule ^sida3\.html$ http://www.example.com/index.html [R=301,L]
Jim
# Enables mod_rewrite
RewriteEngine on
# Sets the base folder of the Flash content
RewriteBase /
# Excludes real files and folders from rewriting
#RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Redirects
RewriteRule ^sida1\.html$ index.html [R,NE,L]
RewriteRule ^sida2\.html$ index.html [R,NE,L]
RewriteRule ^sida3\.html$ index.html [R,NE,L]
Cough. I would read up on what Matt Cutts has to say about such redirects before your site falls down some massive Google-generated anti-web-spam hole that might open up beeath it.