Forum Moderators: phranque

Message Too Old, No Replies

.htaccess again and againnn!

         

omoutop

1:01 pm on Mar 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello,

I really need help on this. There is so much info on the forums that I don't know what is what :(
- I want to redirect internal pages for ex: page1.htm to /page1/index.htm
- I want to know how to do that in order to be search engine friendly (no duplicate content, keep the backlinks and PR)
- I don’t want to put noindex, nofollow in each page because it is much work

- Is this the right code?
RewriteEngine on
RedirectPermanent /page1.htm www.example.com/page1/index.htm
RewriteRule ^page1.htm /page1/index.htm [R=301,L]

- After the changes when I should delete the old pages?

Thank you much

[edited by: tedster at 9:32 pm (utc) on Mar. 18, 2005]
[edit reason] use example.com [/edit]

jetboy

6:44 pm on Mar 18, 2005 (gmt 0)

10+ Year Member



No. You've got a mix of Redirect and mod_rewrite code in there. Try:

Redirect /page1.htm http://www.example.com/page1/index.htm

That'll give a 302 Found response. If you want a permanent 301 redirect, try:

Redirect permanent /page1.htm http://www.example.com/page1/index.htm

You can delete the /page1.htm file immediately, although you might want to leave any associated files (such as images) live for a few weeks until they've been cleared out of Google's cache.

[edited by: tedster at 9:33 pm (utc) on Mar. 18, 2005]

omoutop

6:51 am on Mar 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thank you much Jetboy!

I have a clear mind about this redirection thing now... Short and fine!

Thanks!