View Single Post
Old 04-05-2010, 04:49 PM   #1 (permalink)
MicroHellas
The Visitor
 
Join Date: Apr 2010
Posts: 2
Thanks: 0
MicroHellas is on a distinguished road
Default mod_rewrite for page title

Hello,

Maybe not beginner in PHP but totally novice when it comes to Apache files. So, I'll appreciate your patience. The problem that I want to resolve is:

With PHP functions and parametters, I'm able to pass to the page as title eg a Classified's title. The problem comes when I want to make the url:
Code:
classifieds.php?do=viewitem&itemid=xxx&title=xxx
to look like:
Code:
classifieds/title_here.html
I've tried many possible ways following tutorials but I was unable to make it work My last try is:
Code:
<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteRule ^classifieds/([0-9]+)-[^\/]+\.html$ classifieds.php?do=viewitem&itemid=$1 [L]
</IfModule>
You can check my page at:
http://www.microdemosite.com/dev4/cl...item&itemid=53
(even if I need to change a bit the code to replace spaces with underscores).

Thank you in advance
Maria
MicroHellas is offline  
Reply With Quote