Strange mod_rewrite problem - willing to pay for help.

Discuss practical ways rearrange URLs using mod_rewrite.

Strange mod_rewrite problem - willing to pay for help.

Postby Bigtime » Fri Feb 11, 2011 10:03 pm

Hi,

Here is my rule:

Code: Select all
RewriteRule ^[^/]+/([^/]*)/([^/]*)\.php$ /review_single.php?item_id=$1&id=$2 [L]


Original URL:

Code: Select all
http://www.site.com/review_single.php?item_id=65&id=1007


Rewritten URL:
Code: Select all
http://www.site.com/Chilis/65/1007.php


The word chilis is a category that gets pulled from the database.

****************************************************

Issue:
That works great but there's a part of the website that will only work if I put a forward slash at the beginning changing it to this:


Code: Select all
RewriteRule ^/[^/]+/([^/]*)/([^/]*)\.php$ /review_single.php?item_id=$1&id=$2 [L]


BUT when I do that, it breaks another part of the site.

How do I rewrite that so that one area of the site will work with the '/' and the other part will work without it?

Thanks in advance,

Tim
______
Bigtime
 
Posts: 4
Joined: Mon Nov 24, 2008 11:50 pm

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 29 guests

cron