PHP front controller and Google indexing issues

Hey,

In my project htaccess file I direct any requests to the index.php file and allow my controller to build the site based on the url call. In principle a call might be http://www.domain.com/about/ which my controller will break up, check “about” to the view files and if exists build a template. In short, there is no such file as about/ (which is obvious) and no about.php in the folder http://www.domain.com/ but the actual file (if it even exists) could be in http://www.domain.com/pages/view_about.tpl

The SEO guy came back today saying that the reason why the site is not indexing properly is because when google checks the url called, the header will return a 302 not-found and does not index that location anymore?

Now either the SEO guy is taking a chance or I am doing something wrong. Can someone maybe give me some input on this? What is the industry norm surrounding this topic? If the SEO guy is taking changes, is there a URL or some reference you can give so that I can reply with a valid argument and not just be “A guy on a forum told me so”?

Well some code would be nice. What is in the .htaccess file? Does PHP send a 302 HTTP Header when it routes? (I mean: header( '...Send HTTP Status Here...' );)

I personally never listen to “SEO guys”, more often then not, they believe they know what they are talking about after reading a single piece of information of questionable nature.

Haha thanks for your reply.

The .htaccess file rewrite rules are pretty standard, but here you go:


# Send all universal error documents to the index.php file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [L]

#dont send the apache error document, but rather send the not found to index.php
ErrorDocument 404 index.php

You can have a look at http://www.grandreefcasino.com which is the project in question

I see no problems, Fiddler shows the site is returning a 200 HTTP Status when I put “/about” in the address bar for the site in question.

Btw, you can improve your rewrite query: Simpler pattern along with removing a head ache if you ever use query strings some where for some reason.


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? index.php [L,QSA]

Thank you for your reply.

It appears that the main concern according to him is that it does a 302 redirect (which I cannot see anywhere?) when doing a response like: http://www.grandreefcasino.com/start.php on http://web-sniffer.net

I am pretty convinced that there is no other redirect rules except sending all requests to the index.php file, which to my knowledge isnt a redirect? He says the 302 implicates the indexing of the site on google. I dont know?

The reason he is seeing 302 is because WebSniffer.net does not understand the concept of Sessions or Cookies. However it will not affect Google’s spiders or any other search engine.
The 302 status is “Found” a redirection that Google is more then capable of understanding. And it causes no problems.

Thank you for your help today! I found the “problem” which isnt really a problem, more a session issue :slight_smile:

BTW, how does google handle 302 OK responses? Does this count against ones ranking in any way?