Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: about a 301 redirection using modrewrite

__/ [ David E. Ross ] on Sunday 07 May 2006 20:12 \__

> pegasusflightresources@xxxxxxxxx wrote:
>> Roy Schestowitz wrote:
>>> __/ [ pegasusflightresources@xxxxxxxxx ] on Friday 05 May 2006 20:34 \__
>>>> Luciano A. Ferrer wrote:
>>>>> Hi!
>>>>> I was following the http://www.seomoz.org/articles/301-redirects.php
>>>>> article, trying to do that with one of my test sites
>>>>> I added this to the .htaccess file:
>>>>> RewriteEngine On
>>>>> RewriteCond %{HTTP_HOST} !^domain\.com.ar
>>>>> RewriteRule ^/(.*) http://domain.com.ar/$1 [R=301,L]
>>>>> but nothing change :(
>>>>> So, if the user came from http://www.domain.com.ar it will be 301ed to
>>>>> http://domain.com.ar
>>>>> Or not? any idea?
>>>>> TIA, and sorry for the bad english :)
>>>>> --
>>>>>   Luciano A. Ferrer
>>>>>   laferrerQuiTadme@xxxxxxxxxxxxxxxx
>>>>>   http://relojurbano.com.ar .algún día volverás.
>>>>> ... Uy el nervio estaba vivo...
>>>> You might also be able to use a short little JavaScript and a very
>>>> small page to redirect to the correct domain/host.  An example follows:
>>>> /*Don't mind me leaving out a !DOCTYPE declaration*/
>>>>    <html>
>>>>    <body onLoad="window.location='domain.com.ar';">
>>>>    </body>
>>>>    </html>
>>>> This should use the location element of window to redirect the browser
>>>> to your other site.  You could easily replace the 'window.location'
>>>> with 'location.href' if you want W3C validated code, but I personally
>>>> wouldn't care whether it is valid or not.  As long as it runs, it is
>>>> perfectly okay.
>>>> I have the honor to remain your most humble and Ob't Sv't in our war
>>>> against the King.
>>> Users  will  loathe  it; Not all users have JS  enabled/supported; 
>>> Search
>>> engines  will  not follow and obey the redirection and the list  goes 
>>> on.
>>> JavaScript  might be fine for a one-off re-direction of some page (yes, 
>>> I
>>> have  a few for historical reasons), but all in all, JS is no 
>>> alternative to server-side (thus rather transparent) redirection.
>>> Hope it helps,
>>> Roy
>> This is exactly why I am suggesting this as an alternative, not a
>> replacement.  I'm sure that it would be more successful if one was to
>> use server-side redirection, but I find that one can do many things
>> multiple different ways, and this is one.
>> I have the honor to remain your most humble and Ob't Sv't in our war
>> against the King.
> Using server-side redirection -- with the 301 code -- will help stop
> search engine bots from indexing a page at the "undesired" URL.
> Instead, the bots will index only at the desired URL.  Scripts will not
> do this.

That is absolutely true, but for a single page, the loss may be tolerable.
Moreover, in certain circumstances (personal examples I can think of), the
effect of 'flickering' or somehow 'preparing' the user for the actual page
can be complementary and cheap. One of my hosts gives me no access to  the
site other than FTP (it's BDS-based), so management of the site is harder.
That's why I started JS redirects in the first place. I replaces none sin-

With kind regards,


Roy S. Schestowitz
http://Schestowitz.com  | Free as in Free Beer ¦  PGP-Key: 0x74572E8E
  4:30pm  up 10 days 23:27,  9 users,  load average: 1.10, 0.95, 0.99
      http://iuron.com - semantic engine to gather information

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index