Forum Moderators: Robert Charlton & goodroi
[ClientExample.com...]
It looks like it should be a fauly link that doesn't work but it redirects to my client's site.
Here is another on the same page (wihout the slash) and they both work:
http://www.example.com?Hijacker.com
The server header checker shows this as a 200, normal link. All other outgoing links on the page appear to be normal.
Does the "?" mean this is run by software that runs a search?
The page in question has an url in the format
http//www.example.com/nnnnnnn/querykeyword1,querykeyword2.php
where nnnnnn is a string of numbers, note the keywords are seperated in the url by a comma.
When you open the page up there is no content on the page apart from a context focussed overture ad.
If you look at the source of the page large snippets of text from the websites high in the serps for that query are jumbled and hidden in an iframe.
This site just jumped in at position 1 for this particular query I watch today.
Since just about any server accepts an empty variable after a question mark, the link will work and return a 200. Noting strange there.
However, it's next to useless as far as PR goes, and not used as much these days. It can still be practical for counting purpouses where a site owner doesn't have full access to referral logs. Ask your client if they have had any previous collaboration with the site linking to them.
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html\.(.*) /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html>(.*) /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html-(.*) /$1.html [R=301,L]
RewriteRule ^([0-9Ša-zŠA-Z].*)\.html([0-9Ša-zŠA-Z].*) /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html(.)Enviro(.*) /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html(.)E /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html(.)20E /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html(.)20 /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html(.)$ /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)/(.)target= /$1/ [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.html(.)target= /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)/default\.htm$ /$1/ [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.htm$ /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.ht$ /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.h$ /$1.html [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)\.$ /$1 [R=301,L]
RewriteRule ^([a-zŠA-ZŠ0-9].*)>$ /$1 [R=301,L]
RewriteRule ^&(.*) / [R=301,L]
RewriteRule ^([0-9Ša-zŠA-Z].*)/&(.*) /$1/ [R=301,L]
RewriteRule ^([0-9Ša-zŠA-Z].*).html&(.*) /$1.html [R=301,L]
RewriteRule ^([0-9Ša-zŠA-Z].*).htm&(.*) /$1.html [R=301,L]
Since all of my URLs start with a number or a letter I use the "[0-9Ša-zŠA-Z]" at the begining of my regular expression to prevent any funny stuff. I haven't yet come up with a good instruction to strip off query strings although I'd really like to.
> I haven't yet come up with a good instruction to strip off query strings...
If you add a "?" to the end of your substitution URL, any query string on the request will be cleared.
Demonstrating that, along with a generic rule you might use to replace the first ten of your ".html<plus-more>" rules:
RewriteRule ^([a-zŠ0-9].*)\.html.+$ http://www.example.com/$1.htm[b]l?[/b] [NC,R=301,L]
Lorel,
The "?" and characters following the URL are a query string, and won't do anything unless your site is dynamic, and the page-generation script that you use accepts that query string and processes it in some way to affect the page that it produces.
Otherwise, the only negative effect is that it produces a second URL by which your page can be accessed, thus creating a minor duplicate-content annoyance.
If you're on Apache, and your site is entirely static, you can remove the query string using this general-case rewriterule:
RewriteCond %{QUERY_STRING} .
RewriteRule (.*) http://www.example.com/$1? [R=301,L]
if($REQUEST_URI!="/email.html"){
$strURL="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$arrayURL=parse_url($strURL);
if($arrayURL['query']!=""){
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$_SERVER['HTTP_HOST'].$arrayURL['path']);
exit();
}
}