rewrite cond problem

Discuss practical ways rearrange URLs using mod_rewrite.

rewrite cond problem

Postby yalamber » Wed Sep 15, 2010 1:35 am

hello should i put rewrite cond for ever rule like this?
Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#basic controller action rules
RewriteRule ^([A-Za-z0-9-_]+)$ /$1.php?a=default [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)$ /$1.php?a=$2 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)(.*)$ /$1.php?a=$2$3 [QSA,L]
yalamber
 
Posts: 15
Joined: Fri Sep 07, 2007 12:52 am
Location: biratnagar

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 24 guests

cron