Recalling data from MySQL

Discuss practical ways rearrange URLs using mod_rewrite.

Recalling data from MySQL

Postby pleasehelpme » Wed Sep 24, 2008 4:37 pm

I have finally, after 2 days, managed to 'crack' mod rewrite for my site using:

RewriteRule category1/subcategory1/name1\.htm$ /_Accommodation_view.php?editid1=1
RewriteRule category2/subcategory2/name2\.htm$ /_Accommodation_view.php?editid1=2
RewriteRule category3/subcategory3/name3\.htm$ /_Accommodation_view.php?editid1=3

Whilst I have manged to acheive exactly what I wanted by using excel to copy and paste data I realise there must be a more efficient way to do this. I am guessing it should be something like:

RewriteRule {$show_category}/{$show_subcategory}/{$show_name}\.htm$ /Accommodation_view.php?edit1=$1

Please could someone point me in the right direction?

Thanks in advance
pleasehelpme
 
Posts: 2
Joined: Wed Sep 24, 2008 4:27 pm

Postby richardk » Thu Sep 25, 2008 2:03 pm

richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 24 guests

cron