Rewrite rule not working

Discuss practical ways rearrange URLs using mod_rewrite.

Rewrite rule not working

Postby FLMike » Thu Jul 31, 2008 11:02 am

Code: Select all
RewriteRule ^content/([0-9]+)/?$            /content.php?contentID=$1                           [NC,L]


Seems the above rewrite rule is not working, does not seem to be passing the variable. Any ideas?
FLMike
 
Posts: 4
Joined: Tue Jul 22, 2008 6:58 am

Postby richardk » Fri Aug 01, 2008 3:48 pm

It's because of MultiViews, try
Code: Select all
Options +FollowSymLinks -MultiViews

RewriteEngine On

RewriteRule ^content/([0-9]+)/?$ /content.php?contentID=$1 [NC,L]
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: Google [Bot] and 21 guests

cron