Forum Moderators: coopster

Message Too Old, No Replies

Is PHP a problem?

         

Matahari

3:18 pm on Mar 31, 2004 (gmt 0)

10+ Year Member



Hi,

I dont know if this is the right place to be posting this, but would appreciate any help :)

I had a purely HTML site that was doing well with a Page 1 rank for certain keywords in Google, Altavista, MSN etc, without any optimization techniques at all!

The site was modified two months back and now it uses PHP. Unfortunately it has completely dropped from all the SE's. Now all I can see is the new home page ( which has the same URL as before) and the old html pages in G's ( and other SE) indexes.

Can someone tell me why the spiders are not crawling the entire site? Is a PHP site not crawler friendly? What can I do to get all my pages back into the SERPs?

Thanks!

Birdman

3:40 pm on Mar 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP file extensions in themselves are no problem at all. I, as well as many others, have great results with .php pages.

Now where your problems may exist are in the URL structure. You don't really want URLs like this:

/file.php?id=hghj8w4574554557&iid=87589340450943875

I do my best to not have any query strings in my URLs. I use mod_rewrite to convert friendly URLs back to the original query string URL that the script needs to function.

There is also a way to do it purely with PHP, but I think mod_rewrite is the way to go.

So, if you think your URLs are not friendly, get someone to work some Apache(mod_rewrite) magic to make them so and also be sure to get permanent redirects on all the old .html URLs so the search engines know for sure that they are gone and can be found at the new URL.

Hope that helped,
Birdman

seomike2003

5:56 pm on Apr 1, 2004 (gmt 0)



also with mod rewrite you can put the .htm in the file extensions if you wish :)

hayseed

6:08 pm on Apr 1, 2004 (gmt 0)

10+ Year Member



And if you're hosted on Apache, try researching "AddHandler" and ".htaccess" for more details on how to tell PHP to parse files with different extensions as PHP files. It may be too late now that your original ".html" pages have been dropped from the indices, but you could do a site check with some different search engines and see if any of your old (pre-redesign) pages show up. It may not be too late to recover them, but your mileage may vary. HTH.

john_pinx

6:31 pm on Apr 1, 2004 (gmt 0)

10+ Year Member



file.php extensions are absolutely not the reason. But query strings are! You simply must *not* have filename.php?variable=value . G and others will not go to that page. Various solutions, including those already posted, include revising how the website is buils in PHP. POST'ed variables do not create query strings, and another method is to create a simple link on each page menu to take the crawler to the next page without query strings. Using .htaccess and/or renaming file-endings is not needed. Be creative - think like a SE crawler :-)

john_pinx

lasko

7:52 pm on Apr 1, 2004 (gmt 0)

10+ Year Member



Sorry john_pinx you are wrong I have over 3,500 pages index by google with .php?someid=somevalue.

You need to keep your urls as short as possible and use clean html links which appear on main pages.

Url's like .php?id=value&iid=value&iiid=value could struggle to get into Google.

Golden rule keep it to one and have a well structured web site.

FYI I had another site with 30 pages indexed also using similar but this had 2 values in the url :)

Oh and I have seen more and more .asp?with sessions added to Googles index.

Its getting easier all the time.

seomike2003

8:20 pm on Apr 2, 2004 (gmt 0)



For a good example of a mod rewrite take a look at the address bar right now :)

I know brett isn't adding everypage by hand. It's not SEO'd to it's fullest but it works.

john_pinx

7:46 am on Apr 3, 2004 (gmt 0)

10+ Year Member



Any workable examples of mod_rewrite anywhere. I've read the Apache stuff and it doesn't mention query strings:-(

john_pinx

jatar_k

6:57 pm on Apr 3, 2004 (gmt 0)

john_pinx

7:05 pm on Apr 3, 2004 (gmt 0)

10+ Year Member



Awesome! Thanks a lot - bed-time reading for a week :-)

john_pinx