MrPickle
asked on
HTACCESS - MOD REWRITE - HELP
I am using a mod rewrite to convert a url w/ a query string to a more friendly format.
Example:
http://www.mydomain.com/value/index.php
is interpereted by the server as:
http://www.mydomain.com/index.php?variable=value
The previous part is working.
The problem comes when trying to access a folder off of the web root.
Example:
http://www.mydomain.com/admin/login.php
The server is interpertiing this as:
http://www.mydomain.com/login.php?variable=admin
I need help modifying the .htaccess below to exclude certian values so I can access sub-folders.
Example:
admin
images
css
include
# Begin .htaccess
RewriteEngine on
RewriteRule ^([^/]+)/([^/]+)\.php$ /$2.php?variable=$1
RewriteRule ^([a-zA-Z0-9_-]+)$ /index.php?variable=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ /index.php?variable=$1
Example:
http://www.mydomain.com/value/index.php
is interpereted by the server as:
http://www.mydomain.com/index.php?variable=value
The previous part is working.
The problem comes when trying to access a folder off of the web root.
Example:
http://www.mydomain.com/admin/login.php
The server is interpertiing this as:
http://www.mydomain.com/login.php?variable=admin
I need help modifying the .htaccess below to exclude certian values so I can access sub-folders.
Example:
admin
images
css
include
# Begin .htaccess
RewriteEngine on
RewriteRule ^([^/]+)/([^/]+)\.php$ /$2.php?variable=$1
RewriteRule ^([a-zA-Z0-9_-]+)$ /index.php?variable=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ /index.php?variable=$1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER