Thread: Mod_rewrite
View Single Post
Old 10-26-2007, 08:19 AM   #11 (permalink)
bluesaga
Super Moderator
Advanced Programmer 
 
bluesaga's Avatar
 
Join Date: Sep 2007
Posts: 165
Thanks: 0
bluesaga is on a distinguished road
Default

You need to use a rewrite base if you are going to put it in a sub-folder like so:

Code:
RewriteEngine On
RewriteBase   /cms
RewriteRule ^articles/([0-9]+)/([^/]+)/?$ view.php?action=view&id=$1&article=$2 [QSA,L]
If you do not want to place this in a sub-folder and want to have it in the root folder you need to add prefixes to the urls like so:

Code:
RewriteEngine On
RewriteBase   /
RewriteRule ^cms/articles/([0-9]+)/([^/]+)/?$ view.php?action=view&id=$1&article=$2 [QSA,L]
bluesaga is offline  
Reply With Quote