Forum Moderators: phranque
RewriteRule ^(.*)\.html$ Pageredirect\.html\?$1 [L]
RewriteRule ^http://myoldsubdomain\.myoldhost\.net/(.*)\.html$ http://myoldsubdomain.myoldhost\.net/Pageredirect\.html\?$1 [L] [edited by: g1smd at 8:37 am (utc) on Mar 20, 2012]
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ http://myoldsubdomain.myoldhost.net/Pageredirect.html?$1 [L]
<html><head><title></title>
<script language="JavaScript">
function setURL(){
cell1=document.getElementById("newlink");
cell2=document.getElementById("info1");
cell3=document.getElementById("info2");
request= document.location.search.substring(1)+".html";
part1="<A HREF=\"http://mynewdomain.com/";
part2="\"><FONT COLOR=\"#000099\"><U>http://mynewdomain.com/";
part3="</U></FONT></A>";
cell1.innerHTML=part1+request+part2+request+part3;
cell2.innerHTML="The new link to the requested page is:";
cell3.innerHTML ="Please update your bookmarks and then click on the link to go to the page."
}
</script>
</head>
<body onload="setURL();">
<form onsubmit="return false" > <br> <br> <br>
<table align="center" border="0" style="font-size: 14pt">
<caption style="font-size: 24pt"><b>This page has moved!</b></caption>
<tbody>
<tr>
<td align="left"> </td>
</tr>
<tr>
<td align="left" id="info1">Javascript must be enabled in order to redirect to the new page</td>
</tr>
<tr>
<td align="left" id="newlink"> </td>
</tr>
<tr>
<td align="left" id="info2"> </td>
</tr>
<tr>
<td align="left"> </td>
</tr>
<tr>
<td align="left"> </td>
</tr>
<tr>
<td align="left">Or, to go to the new home page:</td>
</tr>
<tr>
<td>
<A HREF="http://mynewdomain.com/"><FONT COLOR="#000099"><U>http://mynewdomain.com/</U></FONT></A>
</td>
</tr>
</tbody>
</table>
</form>
</body></html>
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ Pageredirect.html?$1 [L] RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ mysubdomain.myoldhost.net/Pageredirect.html?$1 [L] RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ /Pageredirect.html?$1 [L]
# Permanent redirect for search engine bots
RewriteCond %{HTTP_USER_AGENT} bot\.htm [NC]
RewriteRule ^(.*)html$ http://mynewdomain.com$1html [R=301,L]
# For everyone else, divert them to redirect announcement page
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ http://mysubdomain.myoldhost.net/Pageredirect.html?$1 [L]
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ Pageredirect.html?$1 [L]
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ mysubdomain.myoldhost.net/Pageredirect.html?$1 [L]
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ /Pageredirect.html?$1 [L]
RewriteCond %{HTTP_USER_AGENT} bot\.htm [NC]
RewriteRule ^(.*)html$ http://www.example.org$1html [R=301,L]
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ http://www.example.com/Pageredirect.html?$1 [L]
Are you absolutely positive you transcribed the wording of both versions exactly as you had them?
# Permanent redirect for search engine bots
RewriteCond %{HTTP_USER_AGENT} bot\.htm [NC]
RewriteRule ^(.*)$ http://mynewdomain.com/$1 [R=301,L]
# For everyone else, divert them to page moved announcement page
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^(.*)\.html$ http://mysubdomain.myoldhost.net/Pageredirect.html?$1 [L]
The requested URL /e/l/mysubdomain.myoldhost.net/public/mysubdomain.myoldhost.net/Pageredirect.html was not found on this server.
The subpattern (.*) can only be used on the end of a pattern. It must never appear at the beginning or in the middle of a pattern.
You don't have a proper query string.
# Permanent redirect for search engine bots
RewriteCond %{HTTP_USER_AGENT} bot\.htm [NC]
RewriteRule ^(.*)$ http://mynewdomain.com/$1 [R=301,L]
# For everyone else, divert them to the announcement page
RewriteCond %{REQUEST_URI} !Pageredirect [NC]
RewriteRule ^([^.]+)\.html$ http://mysubdomain.myoldhost.net/Pageredirect.html?$1 [L]
RewriteCond %{REQUEST_URI} !Pageredirect [NC] though the NC flag is probably not needed.
The subpattern (.*) can only be used on the end of a pattern. It must never appear at the beginning or in the middle of a pattern.
RewriteCond %{REQUEST_URI} !\.txt$ It appears that their search results are the same as the Bing search results. Did Yahoo get bought out by Microsoft? I seem to remember reading somthing to that effect, but I have a short attention span.