Forum Moderators: phranque

Message Too Old, No Replies

log/stats issues

         

Sisand

9:09 pm on Oct 22, 2009 (gmt 0)

10+ Year Member



Hello,
Please forgive me if I am about to ask "silly questions". My site has only been live for 5 months but I noticed 2 issues in my log/stats:

1. in my log today, I see that there is a http code 304 that appeared for a folder called "/?q=ferries" which is totally unknowned to me. This then led my homepage to link to this folder. As such if I type the URL wwww.mydomainname.com/?q=ferries in the browser, this opens my homepage but I have no such URL so how can it be possible ?

2. I see a permanent redirect 301 code in my Awstats but I have never set up any 301 so again how can this be possible ?

I have searched the internet for answers but nothing so far and I am getting a bit concerned. Could anyone help me please?

Many thanks in advance.

maximillianos

10:18 pm on Oct 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My log files are littered with junk requests like that. You will find the more popular your site becomes, the more bots, scrapers and hackers you will attract. I would not worry about it. It is most likely a bad bot getting lost and looking for a page on the wrong domain.

phranque

2:17 am on Oct 23, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



1. that is actually a request for the default index document of the root directory "/" and everything following the "?" is the query string that is passed to that document.
if that is a cgi script or parsed document then you might do something with a meaningful query string, but if it is a static document it is useless.
however you should be redirecting that to a canonical address when a useless or meaningless query string is requested.

2. it is possible to generate a 301 response in a script (cgi, php, asp, etc) or using a server directive (in a .htaccess file or the server config file for apache) - have you checked all possible locations for the source of the 301 response?

tangor

2:41 am on Oct 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



304 response is "not modified"... generally creates no problems.

phranque

3:39 am on Oct 23, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], Sisand!

tangor, i'm not sure 304 applies here.

tangor

5:57 am on Oct 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sorry, I read question #1 which contains "304" and replied accordingly. Did not address #2. Never have trusted AwStats,

phranque

6:28 am on Oct 23, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



no - my bad!
i read that twice and missed "304" both times!

it doesn't really change my answer, however.
the 304 would normally be the response supplied to a conditional request where cacheing is involved.
if the url with a query string is not valid, you should not respond with a 304 which means "go ahead, keep using the cached version of this resource".
instead the correct response would be a 404 Not Found which means "don't have or don't know what you are looking for" or a 301 Moved Permanently which means "despite your request what you really want is this url so please request that instead".