boards.ie

Go Back   boards.ie > Tech > Software and Web Development > Design

Reply
 
Thread Tools Search this Thread
Old 23-10-2007, 18:06   #1
GaryCocs
Registered User
 
GaryCocs's Avatar
 
Join Date: Mar 2006
Location: Cork
Posts: 1,339
Send a message via AIM to GaryCocs Send a message via MSN to GaryCocs Send a message via Yahoo to GaryCocs Send a message via Skype™ to GaryCocs
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
But when I try and run a rewritemap I'm coming up with an error?

Code:
RewriteMap txtmap txt:categories.txt
By the code above should the categories.txt file be in the same file as the .htaaccess file? I'm having problems figuring out the directory structure!

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.
GaryCocs is offline   Reply With Quote
Advertisement
Old 24-10-2007, 11:18   #2
glengara
Registered User
 
Join Date: Mar 2002
Location: Done Leery
Posts: 30
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/
glengara is offline   Reply With Quote
Reply
  boards.ie > Tech > Software and Web Development > Design Top

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT +1. The time now is 09:44.


© boards.ie Ltd. (Ireland) - Hosted by Digiweb Hosting. Message Boards and Forums Directory