Yay for mod_rewrite woes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a very rudimentary concept and is typically done in a cookie
cutter fashion. However, I can't seem to recall the proper
syntax/conditions to get it to function as required.

Essentially I need to enable SSL in one URL and one URL only, one that
ends in login.php. So I wrote a rule like this:

  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteRule ^/login.php$ https://foo/login.php [R,L]

Works great.

Now in the SSL virtualHost, I want it to redirect to a non-SSL version
of the site if the URL doesn't end in login.php.

  RewriteEngine On
  RewriteRule !^/login.php$ http://%{SERVER_NAME}


This was working great except for one issue. It completely breaks all
images, CSS, JavaScript, and other goodies. Is there a possible way to
exclude those also or perhaps a more appropriate way to rewrite my
second batch of rules for the SSL Vhost?

Cheers,

/sf

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux