Rewrite not catching the second variable

Discuss practical ways rearrange URLs using mod_rewrite.

Rewrite not catching the second variable

Postby newelement » Tue Feb 24, 2009 11:38 am

Project ID is not getting passed.

Code: Select all
RewriteCond %{HTTP_HOST} ^(.+)\.example.com$ [NC]
RewriteRule ^project/([0-9]+)/$ /project.php?company=%1&project_id=%2 [QSA,L]
newelement
 
Posts: 6
Joined: Fri Feb 13, 2009 7:45 am

Postby newelement » Tue Feb 24, 2009 12:11 pm

Nevermind I see the typo. %2 should be $1
newelement
 
Posts: 6
Joined: Fri Feb 13, 2009 7:45 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 27 guests

cron