Michaels-r Posted September 2, 2008 Share Posted September 2, 2008 Hi - I am pretty new to htaccess and cannot seem to get 301 redirection working. I have some pages that have moved and some that Google seems to be searching from a rogue sitemap file (now sorted out) that I would like to move to new pages. My htaccess file (an extract) is as follows: Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / The following 2 lines kill my site completely (404 errors) and so have been commented out for the moment # RewriteRule ^property/66RCG/floorplan.html http://www.steinbeck-reeves.co.uk/index.html [R301.L] # RewriteRule ^Bathrooms.html%20changefreq=monthly%20priority=1.0 http://www.steinbeck-reeves.co.uk/Bathrooms.html [R=301.L] These don't appear to do anything... Redirect 301 /Bathrooms.html%20changefreq=monthly%20priority=1.0 http://www.steinbeck-reeves.co.uk/Bathrooms.html Redirect 301 /property/66RCG/floorplan.html http://www.steinbeck-reeves.co.uk/index.html Bits at the end that do appear to work - just to show that something does! #Error links ErrorDocument 404 http://www.steinbeck-reeves.co.uk/404.html #Hotlink protection RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://steinbeck-reeves.co.uk/.*$ [NC] [OR] RewriteCond %{HTTP_REFERER} !^http://www.steinbeck-reeves.co.uk/.*$ [NC] [OR] RewriteCond %{HTTP_REFERER} !^http://steinbeck-reeves.com/.*$ [NC] [OR] RewriteCond %{HTTP_REFERER} !^http://www.steinbeck-reeves.com/.*$ [NC] [OR] RewriteCond %{HTTP_REFERER} !^http://steinbeck-reeves.uk.com/.*$ [NC] [OR] RewriteCond %{HTTP_REFERER} !^http://www.steinbeck-reeves.uk.com/.*$ [NC] [OR] RewriteRule .*\.(gif|GIF|jpg|JPG|bmp|BMP|wav|mp3|wmv|avi|mpeg)$ - [F] All suggestions welcome. Thanks, Michael Link to comment https://forums.phpfreaks.com/topic/122411-htaccess-301-redirection-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.