Re: Moving a web site: am I doing this right?
- From: axlq@xxxxxxxxxxx (axlq)
- Date: Wed, 9 Jan 2008 01:55:48 +0000 (UTC)
In article <5uigopF1hf8p3U2@xxxxxxxxxxxxxxxxxx>,
Klaus Johannes Rusch <KlausRusch@xxxxxxxxxxx> wrote:
axlq wrote:
Redirect 301 sample1.html http://new_domain.com/samplepage1.php
Redirect 301 page2.html http://new_domain.com/foobar.php
RewriteEngine On
RewriteRule page([0-9]+) http://new_domain.com/pagegroup.php?p=$1 [R=301,L]
ReWriteRule [^/]* http://new_domain.com/ [R=301,L]
The Redirect rules will not be used because RewriteRule already rewrote
the request and redirected to your site.
It did? I thought the lines in an .htaccess file are acted on in
sequental order. I'm turning the RewriteEngine on only after all
the other redirects. Are you saying that the mere presence of the
RewriteRule statement invalidates all preceding redirects, even if
the redirects appear before the RewriteEngine On statement?
You will need to change the redirect lines to RewriteRules also, or
somehow exclude them from the rewrite processing.
Wouldn't putting "RewriteEngine Off" at the top of the file
accomplish that? In other words, I'd be nesting the redirects
between RewriteEngine Off and RewriteEngine On.
The last RewriteRule can be simplified to
RewriteRule . http://new_domain.com/ [R=301,L]
Ah yes. Thanks.
-A
.
- References:
- Moving a web site: am I doing this right?
- From: axlq
- Re: Moving a web site: am I doing this right?
- From: Klaus Johannes Rusch
- Moving a web site: am I doing this right?
- Prev by Date: Re: Moving a web site: am I doing this right?
- Next by Date: Re: Server accelerator options: Squid, apache's built-in web caching or hardware "solutions"
- Previous by thread: Re: Moving a web site: am I doing this right?
- Next by thread: Re: Server accelerator options: Squid, apache's built-in web caching or hardware "solutions"
- Index(es):
Relevant Pages
|