|
-
mod_rewrite - how to strip .php off URLs under certain conditions
I'm using the following in .htaccess to strip ".php" off requested URLs:
RewriteCond %{THE_REQUEST} ^GET\ /.+\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^(.+)\.php$ http://www.mydomain.org/$1/? [R=301,L]
However, the admin for this site DOES need the .php displayed - e.g.:
http://www.mydomain.org/admin/editSomething.php
How can I alter my above mod_rewrite rule so that it does NOT activate if the request points at the "admin" directory?
Something to do with:
!^admin
but I'm not sure how to work that into the above.
Thanks!
- Bob
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks