Redirect all html -> php and more..
I am in the middle of changing over to php (at last). I have done some reseach but before I go ahead just wanted to check. I am going to edit the htaccess file with this:
RedirectMatch 301 (.*)\.html$ http://www.example.com$1.php
any comment on this?
The domain is actually an addon domain in hostgator, just checking that this should not matter, I think I just need to create htaccess and put in the root of the addon?
The main domain is also changing:
However a little more complicated
I have also changed from html -> php but ALSO changed a whole bunch of files to another directory.
Now I want to do two things:
1) redirect to php
2) for 20+ pages change the path
Can I therefore use above redirect from html to php, and then I guess I will have to add each page 301 thats changed directory?
eg. ww..home.com/help-me-please.html
to: ww..home.com/articles/help-me-please.php
Also wanted to put in a 404 redirect to a page incase I missed anything, being the main domain how can I say
any 404 from ww..home.com -> new
but not to include any addon domains 404's
Q - do I need a htaccess file then on each addon domain - as I think the current main htaccess covers all domains at the moment?
hope that made sense
Your help is much appreciated
Jason
Roger Willcocks
L-Space Design
Please vote to help me win a 3kW solar array