Forum Moderators: phranque
Options +FollowSymlinks
DirectoryIndex index.html index.htm index.php
RewriteEngine on
RewriteBase /
#RewriteRule !redirect.html /redirect.html
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_HOST} ^(.*)example\.net [NC]
RewriteRule (.*) http://%1example.org%{REQUEST_URI} [R=301,L] or a [misbehaving] down-stream proxy server between the requesting location and your server
RewriteEngine on
#RewriteRule !redirect.html /redirect.html
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_HOST} ^(.*\.)?old\.net [NC]
RewriteRule ^(.*)$ http:/ /%1new/$1 [R=301,L]
RewriteCond %{HTTP_REFERER} !^http://www2.old.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www2.old.net$ [NC]
Oh, YUK. That is a real possibility and may be an insoluble problem. Some ISPs are notorious for remote-caching, and no power on earth will get them to disgorge a fresh copy of a page if they don't feel like it. You think you're refreshing, but all you're getting is whatever the ISP has in its cache.
[edited by: JD_Toims at 2:37 am (utc) on Sep 15, 2013]
HTTP/1.1 404 Not Found
Date: Sun, 15 Sep 2013 23:30:12 GMT
Server: Apache
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 404 Not Found
Date: Sun, 15 Sep 2013 23:31:20 GMT
Server: Apache
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 302 Moved Temporarily
Date: Sun, 15 Sep 2013 23:31:53 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=m56eghbi1j6mrq94v8m323ut84; path=/
Vary: Host,Accept-Encoding,User-Agent
Location: http://sub.new.org/cookiepage.php
Connection: close
Content-Type: text/html
HTTP/1.1 302 Moved Temporarily
Date: Mon, 16 Sep 2013 01:24:39 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=efrodb0ugtoo0djseqpdrru630; path=/
Vary: Host,Accept-Encoding,User-Agent
Location: http://sub.newdomain.org/form_cookie.php
Connection: close
Content-Type: text/html
HTTP/1.1 301 Moved Permanently
Date: Mon, 16 Sep 2013 01:29:58 GMT
Server: Apache
Vary: Host,Accept-Encoding,User-Agent
Location: http://sub.newdomain.org/story-test3.php?no=600054278?no=600054278
Connection: close
Content-Type: text/html
HTTP/1.1 302 Moved Temporarily
Date: Mon, 16 Sep 2013 01:30:55 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=sh8ftsk91h14kk6tto0dfhbeh5; path=/
Vary: Host,Accept-Encoding,User-Agent
Location: http://sub.newdomain.org/form_cookie.php
Connection: close
Content-Type: text/html
[edited by: JD_Toims at 3:32 am (utc) on Sep 16, 2013]
In .htaccess, at the root of the old domain.
put the 301 redirects for the old domain in the new domain's .htaccess?
What's weird is that I had to add the .htaccess file to the NEW domain's subdomains, not the old, in order for this to work.