Results 1 to 1 of 1
This is probably really easy, but it is driving me nuts.
I have a .htaccess as shown below that works. It will send anything with /admin to the secure port. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-09-2008 #1
Mod_rewrite expression to NOT match a whole word
This is probably really easy, but it is driving me nuts.
I have a .htaccess as shown below that works. It will send anything with /admin to the secure port. And then it will correctly rewrite the urls.
What I need to do is send anything on HTTPS that is NOT for /admin to the HTTP port.
Code:RewriteEngine on Options +FollowSymLinks RewriteBase / RewriteCond %{SERVER_PORT} ^80$ RewriteRule ^admin/?$ https://%{HTTP_HOST}/admin [L] RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(?!admin)/?$ http://%{HTTP_POST}/$1 [L] ### HERE I want to send any HTTPS request NOT to /admin/ to HTTP the above doesn't work.. RewriteRule ^([^/\.]+)/?$ /index.php?page=$1 [L]
How do I say not "admin" - I seem to be able to do not a or not d and so on!
__________________If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
The Fifth Continent reborn


Reply With Quote
