Rewrite conditions for admin section

New to mod_rewrite? This is a good place to start.

Rewrite conditions for admin section

Postby lump` » Thu Nov 05, 2009 4:51 am

Hey, I have this:
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^admin/([A-Za-z0-9_-]+)/?$   /TestSites/CMS_Basic/admin/index.php?page=$1   [NC,QSA,L]


I want to add another rule like this

Code: Select all
RewriteRule ^([A-Za-z0-9_-]+)/?$   /TestSites/CMS_Basic/index.php?page=$1


But it always messes up, I've 'attempted' RewriteConds, a number of rules and flags but the best I can achieve is it working and cutting off the first character in the $_GET['page']
lump`
 
Posts: 4
Joined: Fri Sep 04, 2009 11:30 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 7 guests

cron