Forum Moderators: phranque

Message Too Old, No Replies

Content Negotiation

         

Robber

4:27 pm on Oct 15, 2004 (gmt 0)

10+ Year Member



Posted a couple of days ago about spiders 404 testing. I fixed this problem thanks to JD by disabling MultiViews.

However, we run another server as well and I today noticed that Googlebot had requested a page like this:

h**p://www.abc.co.uk/qwe-widget.php/rty-other.php

This doesn't give a 404, instead the page views as if it in a sub birectory (the CSS all gets screwed because the site uses relative paths)

I tried turning MultiViews off but it didn't work this time. It does seem slightly different though, the problem I had on the other server was more like this:

h**p://www.abc.co.uk/qwe-widget/rty-other/sdfg/sdfg/sdf/sb.php

Previously the real file name was specified in the URL as a directory (the file extension was chopped off). In the this new problem the file name is in their in full.

I have used PHP to script a temporary solution but I can't figure out how to sort this at the apache level.

I thought it mightbe to do AcceptPathInfo, but that didn't seem to fix it either. Anyone got any suggestions?

Many thanks

Robber

4:54 pm on Oct 15, 2004 (gmt 0)

10+ Year Member



I'm almost certain this must be due to AccpetPathInfo, but I have tried the following:

<Directory "/home/www.abc.co.uk/www/htdocs">
AcceptPathInfo Off
</Directory>

But this doesn't seem to solve it. Any suggestions?

Thanks

jdMorgan

8:06 pm on Oct 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Somewhere in httpd.conf or .htaccess, you probably have some mod_rewrite code that redirects page requests to your script(s). Look for the problem there. It is likely that you are rewriting to a relative path, that is, rewriting to "script.php" instead of rewriting to "/script.php".

Jim

Robber

9:20 am on Oct 18, 2004 (gmt 0)

10+ Year Member



Hi JD,

thanks for dropping by to help (again!). I had wondered if it could be that but all my mod_rewrite is done httpd.conf in virtual host directives. And its pretty simeple stuff:

RewriteCond %{HTTP_HOST}!^www\.abc\.co\.uk
RewriteRule ^(.*)$ ht*p://www.abc.co.uk$1 [R=301,L]

I even tried :
RewriteEngine Off

But I got the same problem. Also I get the problem on all sites hosted on this server.

Anything else I could try?

Thanks

jdMorgan

12:54 pm on Oct 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Let me phrase my reply a little better...

Do your "published" URLs actually point to real (individual) php files, or do you rewrite them to a dynamic php page that generates appropriate content for each request?

If you are rewriting various URLs to a php script, then I'd look for the problem in that rewrite. Maybe you are using some other mechanism to do this. Whatever the mechanism, it sounds like it's going wrong there.

Jim

Robber

5:14 pm on Oct 19, 2004 (gmt 0)

10+ Year Member



Thanks for the clarification JD, but no, I tested it on one of our sites that only has an index page, index.php, which does exist on the server, no re_writing used other than to catch people not using www.

Something seems very odd!

jdMorgan

6:50 pm on Oct 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might want to examine your DocumentRoot directive, and see if the "subdirectory" you are seeing is the path specified in DocumentRoot. If so, you may be able to use the RewriteBase directive to fix this. I'm not sure it will help, but I can't think of anything else, given the information we have here.

You can also turn on rewrite logging in httpd.conf -- that may help you figure out how the path is getting modified.

Also check any Alias or ScriptAlias directives you may have... Anything that can affect how URLs are mapped into the filesystem.

Jim

Robber

1:17 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



Thanks JD, I will check out those various points and see what we can find