Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Alternative to 301 Redirects for redirecting URLS?

         

ichthyous

10:31 pm on Jan 22, 2009 (gmt 0)

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



I have been unable to use 301 redirects or any other type of regex redirects in my htaccess file since installing my site's url rewrite module. Are there any other alternatives I can use to redirect the spiders to the new urls? Also, does Google have any capability to detect changed urls on a site on its own? Thanks!

phranque

3:36 am on Jan 23, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



google's ability to detect url changes on your site is dependent on your server returning the proper response for that case, which is a "301 Moved Permanently" redirect or "302 Found" temporary redirect.
see:
HTTP/1.1: Status Code Definitions [w3.org]

tedster

4:10 am on Jan 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Both Google and Yahoo sometimes accept a 0 second meta refresh as though it were a 301 status redirect. In 2007, Google spokesperson Adam Lasnik had this to say:

"...best idea is to use 301/302s directly whenever possible; otherwise, next best is to do a metarefresh with 0 for a 301. I don't believe we recommend or support any 302-alternative."

Google Groups thread [groups.google.com]

The meta refresh is not as dependable as a true 301 because it has been rather seriously abused by spammers in the past. So if you do use it, keep its use minimal and be very precise - do NOT introduce chains of meta refreshes or anything remotely like that.

I have been unable to use 301 redirects or any other type of regex redirects in my htaccess file since installing my site's url rewrite module.

That sounds pretty funky to me. I'd take a close look at that custom module and be very sure you undertand it fully.

ichthyous

4:32 am on Jan 23, 2009 (gmt 0)

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



Yes the regex rules are fairly straightforward, but with the url rewrite module enabled on my site none of them work anymore. I don't fully understand the module, but I do know that since all the urls are being rewritten by the module it seems to ignore any outside call for redirects or rewrites. The only redirects which continue to work are for static html pages which aren't part of the dynamic database that uses the module...they are just additional content pages.

ichthyous

10:51 pm on Jan 23, 2009 (gmt 0)

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



I discovered what the problem was. Since the old urls were just virtual urls generated by the url rewrite module and stored in the apps database, the server didn't have any 'physical' directory structure to refer to in public html. I created a matching directory structure in public html for apache to refer to and the redirects all started working fine.