Re: Moving a web site: am I doing this right?



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
.



Relevant Pages

  • Re: Redirect?
    ... Is this what is controlling my redirects? ... RewriteEngine On ... Would another script in my htaccess file do ... do you know what the script would look like? ...
    (alt.internet.search-engines)
  • Re: OT ish... .htaccess stuff
    ... using .htacces, also redirects are possible. ... Is it possible to do an ip specific re-direct to an identical looking site which is not DNS listed? ... This is a political issue to do with specific IP's and un-ethical policies and possible automated spidering that are being used to enforce illegal pricing policies. ... RewriteEngine On ...
    (alt.internet.search-engines)
  • Re: Trouble with AddType application/x-httpd-php .png
    ... KB> RewriteEngine On ... You forgot flag. ... (Query String Append) ... KB> basically just redirects all .PNG requests to a single PHP script, ...
    (comp.lang.php)
  • Re: Trouble with AddType application/x-httpd-php .png
    ... KB> RewriteEngine On ... You forgot flag. ... (Query String Append) ... KB> basically just redirects all .PNG requests to a single PHP script, ...
    (comp.lang.php)
  • Re: 301 redirect
    ... sergey wrote: ... I read that I have to insert the following lines to my .htaccess file. ... RewriteEngine On ... But I do not have acces to .htaccess file ...
    (alt.internet.search-engines)