PDA

View Full Version : htaccess301


Jane
04-30-2009, 07:58 AM
Hi please can someone help. i have changed the name of a folder in dreamweaver and want to set up the redirect to the new page/folder

i have trawled through the internet and come across the htaccess301 redirect

i have set this up but it doesnt work so obviously i am doing something wrong. this is what i have done so far

i created a txt file, named it .htaccess and uploaded it to the server

the file that has changed was called:
http://www.michael-smith-engineers.co.uk/products/high-pressure-diaphram/index.htm

it is now changed to
http://www.michael-smith-engineers.co.uk/products/high-pressure-diaphragm-pumps/index.htm

its actually the sub folder name that i have changed so it will affect quite a few pages, just for now though i am trying to redirect just the one page then i would like to base it on everything with the folder

This is what the txt file looks like which i have uploaded

Redirect 301 /michael-smith-engineers.co.uk/products/high-pressure-diaphram/index.htm http://www.michael-smith-engineers.co.uk/products/high-pressure-diaphragm-pumps/index.htm

Please can someone tell me where i am going wrong

Many thanks

Jane

edbr
04-30-2009, 10:00 AM
try
Redirect 301 /products/high-pressure-diaphram/index.htm (http://michael-smith-engineers.co.uk/products/high-pressure-diaphram/index.htm) http://www.michael-smith-engineers.c...umps/index.htm (http://www.michael-smith-engineers.co.uk/products/high-pressure-diaphragm-pumps/index.htm)

DWcourse
04-30-2009, 02:09 PM
If you want to redirect the whole directory rather than just the index.htm page I believe this will do it:

redirect 301 /products/high-pressure-diaphram/ (http://michael-smith-engineers.co.uk/products/high-pressure-diaphram/index.htm) http://www.michael-smith-engineers.com/high-pressure-diaphragm-pumps/ (http://www.michael-smith-engineers.co.uk/products/high-pressure-diaphragm-pumps/index.htm)

good discussion on 301 redirects here… (http://www.seorefugee.com/forums/web-design-coding/2825-htaccess-help-tips.html) and here… (http://www.seorefugee.com/forums/web-design-coding/1010-htaccess-mod_rewrite-faq.html)

As you can see it causes a lot of folks a lot of trouble.