[PHP] path reduction for SEO

Joined
Jun 8, 2007
Messages
1,961
Reaction score
475
Say I have a page called site.com/folder/file.php?var=value&var2=value2.

But I want the site to be called site.com/folder/file.php instead to improve search results.

Purpose: It's said all around that google will find shorter paths more likely than long ones.

I can't use the popular .htaccess script that does it because my host doesn't accept that script; I tried it.

Is there a php script that will show a mask on the url, but still keep the values?

real page example for username=Spence: http://www.avsbest.com/profile/profile.php?username=Spence
turn into: avsbest.com/profile/Spence
or avsbest.com/profile/Spence.php
 
The ModRewrite method is really the way to go, but you can't use it it seems. In that case you should direct all incoming page requests of your directory (www?) to one PHP page: index.php. Then, in index.php you would parse the requested URL ($_SERVER['REQUEST_URI']) and decide what goes to what PHP page.

Are you using a freehost? If not, you should ask the provider since ModRewrite is quite normal to be turned on...
 
Back