Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
omoutop
Joined: Feb 16, 2004
# Posts: 22
|
Posted: 2005-Mar-15 15:53
Hello,
Could you tell me if the following code for .htaccess is correct in order to do a search engine friendly internal redirection without loosing the PR and the backlinks?
RewriteEngine on
RewriteRule ^page1.htm page2.htm [L]
Thank you very much!
|
 |
bhartzer
Staff
Joined: Jun 08, 2000
# Posts: 7042
|
Posted: 2005-Mar-15 16:03
You need to use a 301 Permanent Redirect, not a rewrite or a 302 redirect. To redirect "page2.html" to "page2.html" using a 301-Moved permanently redirect, use one of these:
RedirectPermanent /page1.html www.url.com/page2.html
|
 |
g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10465
|
Posted: 2005-Mar-15 19:27
Make sure you also redirect all non-www URLs over to the www version using ModRewrite to stop any other duplicate content issues too.
|
 |
lizardz
Joined: Nov 12, 2004
# Posts: 1394
|
Posted: 2005-Mar-15 20:32
Or this:
RewriteRule ^page1.htm page2.htm [R=301,L]
Keep in mind that the L tells apache to stop all directive processing, so no rule will execute after that one if that one applies. That gets confusing at times.
|
 |
omoutop
Joined: Feb 16, 2004
# Posts: 22
|
Posted: 2005-Mar-16 09:35
Thank you all!
So, the right code for my internal redirection should be... :
RewriteEngine on
RedirectPermanent /page1.html www.url.com/page2.html
RewriteRule ^page1.htm page2.htm [R=301,L]
... and this for every redirection I want to do...
Sorry to insist but it is a really critical procedure.
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|