Well, I've just moved all my files from .html to .php but most search engines still point to the html files.
I've made a .htaccess file with this in:
Code:
Options +FollowSymLinks
RewriteEngine On
RedirectMatch 301 (.*)\.html$ $1.php
ErrorDocument 404 http://example.co.uk/error_docs/404.html
Which works, except I have some pages (as you can see, 1 is the 404 page) that need to stay as html. Some others are the googlesitemap validation file.
I've looked at
RewriteCond %{REQUEST_URI} !^/error_docs$
but I can't seem to get it to work. What's the best way of excluding files
the files I have are:
/error_docs/404.html
google466e821b876059fa.html
and a few folders such as
/design/
/scripts/
and a few others.
So as not to make a new topic: a few other things.
the 404 redirect:
sites like amazon.co.uk DON'T redirect the user to a new page if they get a 404
e.g. if you go to
http://amazon.co.uk/adkfhkh
the error show up on that page as opposed to being sent to amazon.co.uk/custom404page.html
is there a way of doing this?
The final thing:
I recently updated the diary / blog on the site to wordpress (from 100% manual!)
so I have pages like
nov07.html
dec07.html
etc. that I want to redirect to /diary/
is there a way of doing this?
I've tried
Code:
RedirectMatch 301 (.*)07\.html$ /diary
thanks
