Jump to content

htaccess 301 redirection problem


Michaels-r

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.