mod rewrite with exception

Discuss practical ways rearrange URLs using mod_rewrite.

mod rewrite with exception

Postby asafk » Tue Jan 03, 2006 1:20 am

Hello!

I run a web site, the site is behind a reverse proxy that runs on linux
with apache 2.
I use mod rewrite to force all the requests to use httpS like so-
## RewriteEngine On
## RewriteRule ^/(.*)$ https://www.MySite.net/$1 [R,L]

The problam is that i have a single page/action in my site that cant
use https-
http://www.MySite.net/nohttps.do

I want that mod rewrite will force everyone to use https Except
requests that directed directly to nohttps.do action.

Please help
asaf
asafk
 
Posts: 1
Joined: Tue Jan 03, 2006 1:10 am

Postby seomike » Tue Jan 03, 2006 5:16 pm

RewriteCond %{REQUEST_URI} !^/nohttps.do


add that on top of your rewrite rule
seomike
 
Posts: 331
Joined: Thu May 06, 2004 7:36 pm
Location: Dallas


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 8 guests

cron