Re: How to rewrite specific URL to use https

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

 



On 7/18/07, Ted Fines <ted.fines@xxxxxxxxxxxxxxxxxxx> wrote:

 RewriteLog
"/usr/local/apache/logs/server.mac.edu.rewrite.log"
RewriteCond %{SERVER_PORT} !^443$
 RewriteCond %{REQUEST_URI} ^/restricted(.*)$ [NC]
 RewriteRule ^/restricted(.*)$
https://%{SERVER_NAME}%{REQUEST_URI} [R,NC]
 RewriteMap  lowercase int:tolower
 RewriteRule (.*) ${lowercase:$1} [PT]
 </VirtualHost>

Then in the mod_rewrite log, I see messages like:
rewrite /restricted/ ->
https://server.macalester.edu/restricted/
(ok, good)

But then I see
 rewrite https://server.macalester.edu/restricted/ ->
https://server.macalester.edu/restricted/

Isn't that just hitting the lowercase map?

If so, you can either add [L] to the flags on your redirect, or you
can test whether the lowercase is really necessary with a
RewriteCond $1 [A-Z]

Joshua.

---------------------------------------------------------------------
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