Forum Moderators: phranque
OK, I give up, why does every se puke on this line? I don’t want do use js unless I have to. The line works fine with every browser on my unix server, but every se gives me a
[Tue Apr 1 09:22:52 2003] [error] [client 64.68.82.57] File does not exist: /home/xxxxxx/public_html/(none)
Every bloody se does it. But if I redirect it, the all can eat it fine.
crawler11.googlebot.com - - [01/Apr/2003:09:22:52 -0600] "GET /(none) HTTP/1.0" 404 3725 "-" "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"
Redirect /(none) [mydomain.com...]
crawler11.googlebot.com - - [24/Apr/2003:10:22:26 -0500] "GET /(none) HTTP/1.0" 302 293 "-" "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"
crawler11.googlebot.com - - [24/Apr/2003:10:22:29 -0500] "GET /index.html HTTP/1.0" 200 35038 "-" "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"
Since the browser see the url they came from, they don’t redirect.
BTW, it does help catch bots.
j105.crc23.jaring.my - - [22/Apr/2003:04:54:22 -0500] "GET /(none) HTTP/1.1" 302 305 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)"
I don’t want to do a ‘Bozo No-No’, but I do want to use HTTP_REFERER instead of js and since I have several pages that dead end from every page with a menu, the HTTP_REFERER is a real good way of sending users back to the page they came from.
Any ideas?
The best way to insert a back button is with JavaScript: <a href='#' onclick='javascript:back()'>Back</a> or someting along that line...I can't quite remember.
Try this though... print the back link using javacript: <script>document.writeln("<a href='#' onclick='back()'>Back</a>");</script>. This means users with JavaScript enabled will see the back button, those without will not, and those without will not click on a link that does nothing!
Welcome to the forums.
I guess my question is, is there any way to redirect with out getting my hands slapped by evey SE? I mean, it is a legal way of doing things.
I don't understand why when a SE sees (none) it doesn't just ignore it. I have never seen a page called (none), but I guess one could exist. Heck, I wasn't even sure at first if i could redirect (none). Something came back (null) once as well, but it was a email harvester, so I didn't do anything about that.
I never have written any php stuff but I have been writing ‘C’ for 15 years, I can see how that might work. But it didn't work verbatim and I don’t really want to go through another learning curve to do something that is valid HTML 1.0 stuff. I reckon it’s missing at least the a href= part. All it did as written was print the line, and when I played with it a little, I got either nothing, or ) else echo(someting);?>
I could write a PERL script and do a #exec cgi=, but that is a long way to go to correct something I shouldn’t have to. I noticed in google, it followed (none) to my index.html and re-indexed index.html file. Geeze!
the documentation is here: [php.net...]
if you only :-) have been messing around with C and Perl, then PHP is something of a new ballgame, as you can almost freely mix html and PHP into each other
You can check for the existance of the variable in SSI by using the if directive. Something like this:
<!--#if expr="$HTTP_REFERER = /.+/"--><a href="<!--#echo var="HTTP_REFERER" -->">Back</a><!--#endif-->
I haven't tested if it actually works for HTTP_REFERER, though, I used to use this to check DOCUMENT_ROOT for a document available at two URLs.