![]() |
|
|
#1 |
|
Registered User
![]() |
mod_rewrite
Hi Lads,
So starting to have a look at this stuff now, (test server is xampp) so I can test the simple rewrite rules below no problem. Code:
## REWRITE DEFAULTS ### RewriteEngine On RewriteRule ^index\.php$ aboutus.php [R] RewriteRule ^pub/([0-9]+)/$ pub.php?pubid=$1 Code:
RewriteMap txtmap txt:categories.txt Basically I have a DB which i reference by pubid's and would prefer to have a url including pubnames? so instead of http://www.ratemypub.ie/pub.php?pubid=13 i would have http://www.ratemypub.ie/cork/costigans or something like that? much more seo friendly, what I was going to do is use the mod_rewrite to create a categories.txt file and do a look up there of the corresponding id? Anyways for those seo experts, what is the best addressing for google? http://www.ratemypub.ie/cork/the-hole-in-the-wall/ http://www.ratemypub.ie/cork/the+hole+in+the+wall/ http://www.ratemypub.ie/cork/the_hole_in_the_wall/ http://www.ratemypub.ie/cork/the%20h...%20the%20wall/ is it better to have a trailing "/" or should i leave it out? Thanks Gary Any help at all would be much appreciated! Last edited by GaryCocs; 23-10-2007 at 20:34. |
|
|
|
|
Advertisement
|
|
|
#2 |
|
Registered User
![]() |
Main reason for using a / rather than a file extension is to future-proof the page in that you could change ithe format from say .html to .php without G treating it as a 'new" page.
As for addressing, I still favour the good old http://www.ratemypub.ie/cork/the-hole-in-the-wall/ |
|
|
|
![]() |
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|