Forum Moderators: phranque

Message Too Old, No Replies

301 redirect permanent?

         

prempt

2:03 am on Jan 18, 2006 (gmt 0)

10+ Year Member



I have a few domains with the same name but different extentions, so I did a Rewrite 301 redirect in one of included files under /etc/httpd/conf.d. Now two months later I have decided to have the different extentions point elsewhere, I.E. .net to one site, .us to another.. However when I removed the original redirection and restart httpd I still get the page it was originally redirected to.

I have cleared name cache, as well as clearing the local workstation cache to make sure I was getting a fresh ip from the dns server. Still points to same address as it was originally redirected to. Do 301 redirects propagate throughout the internet and become permanent?

Is there any way to remove the 301?

Thanks

jdMorgan

2:26 am on Jan 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you clear your *browser* cache, though?

The redirects, once removed, should have no further effect on non-cached requests.

A 301-Moved Permanently redirect means that the page has been permanently moved. It does not mean that the redirect response is permanent -- There is no 'memory mechanism' on the Web to remember it once it has been removed.

Jim

prempt

3:17 am on Jan 18, 2006 (gmt 0)

10+ Year Member



Yes, did the old ctrl+f5 routine, and to be certain that I wasn't using any old cache lurking somewhere on any machine I was using, I also logged into another linux server(in another state) and used the old command line Lynx and still came up with the same redirect.

Guess if 301's aren't stored somewhere permanently then I must have some coding wrong that I am not picking up on. Although the 301 has been working fine, it's the stoping that is the problem.. Here is the coding for the names, I took out the perm. redirects for the extentions and just left in the redirects for the non www to www.

<VirtualHost 0.0.0.65:80>
Options +FollowSymlinks All -Indexes
rewriteEngine on
RewriteCond %{SERVER_NAME} ^example\.info$
RewriteRule ^(.*)$ [example\.info...] [R=301,L]
ServerAdmin me@example.com
DocumentRoot /var/www/example.info/html
ServerName example.info
ServerAlias *.example.info
ErrorLog /var/log/httpd/example.info.error_log
CustomLog /var/log/httpd/example.info.access_log combined
</VirtualHost>
<VirtualHost 0.0.0.67:80>
Options +FollowSymlinks All -Indexes
rewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.org$
RewriteRule ^(.*)$ [example\.org...] [R=301,L]
ServerAdmin me@example.com
DocumentRoot /var/www/example/html
ServerName example.org
ServerAlias *.example.org
ErrorLog /var/log/httpd/example.org.error_log
CustomLog /var/log/httpd/example.org.access_log combined
</VirtualHost>
<VirtualHost 0.0.0.65:80>
Options +FollowSymlinks All -Indexes
rewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.us$
RewriteRule ^(.*)$ [example\.us...] [R=301,L]
ServerAdmin me@example.com
DocumentRoot /var/www/example.us/html
ServerName example.us
ServerAlias *.example.us
ErrorLog /var/log/httpd/example.us.error_log
CustomLog /var/log/httpd/example.us.access_log combined
</VirtualHost>

The hosts ending in 65 used to end in 67, just like the middle Vhost is now. If I ping the names they all go to the IP address they are supposed to go to, just the web access all still point to the .org address no matter what site or workstation I use.

prempt

3:20 am on Jan 18, 2006 (gmt 0)

10+ Year Member



Just as an FYI, I replaced {HTTP_HOST} in the first instance with {SERVER_NAME} thinking there might have been a bug in the {HTTP_HOST} on this server.. Still same results..

jdMorgan

3:49 am on Jan 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I didn't realize these were on separate IP addresses. Because of that, I'd look into the DNS a bit more, and also, check the machine(s)' hosts files, and make sure you haven't hard-coded the IP-domain associations in those files.

Jim

prempt

4:09 am on Jan 18, 2006 (gmt 0)

10+ Year Member



Thought I went through my DNS files and changed everything I needed to. In a way I did, however I had all of my domains that I was trying to un-redirect, in the same named file with the redirected one.

And lo and behold that little old www was still pointing to the old ip address. So the rewrite was rewriting non-www to www which in turn was now pointing to the old address. Had I pinged the www.example.us and .info to start with I would have noticed this.

So they now reside in different files, cache cleared and domains show up(as long as I use my DNS), now it's just a matter of waiting for the rest of the internet DNS servers to sync.

If not for your suggestion about the DNS methinks I would still be giving this PC a bunch of 4 letter words to remember me by :)

Thanks again...

jdMorgan

4:15 am on Jan 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Saved them from defenestration, did I? :)

I see a market in street-level signs reading, "Caution, computer maintenance above!"

Welcome to WebmasterWorld!

Jim