Re: Rewrite Rule

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

 



On 02.03.2012, at 15:59, Vivek Nambiar wrote:
> http://servername:port/myapp then it should redirect itself to https://servername:SSLport/myapp.
> 
> I have added the following rewrite condition and rule in my httpd.conf file
> 
> RewriteCond %{SERVER_PORT} PORT
> RewriteRule ^/(.*)$ https://%{SERVER_NAME}:SSLPORT/$1 [R,L].
> 
> The rewrite rule works only if I use the url as http://servername:port/myapp/ (i have to add a "/" infront of my application)
> 
> if I use http://servername:port/myapp then the rewrite is done only for the port,that is it changes to http://servername:sslport/myapp (http does not change to https).

Add a RewriteLog, and set a RewriteLogLevel of, as a start, 4. Make a single request, look at the output. If you don't see the problem yourself then, post the log output for that one request, and your full rewrite config. Maybe there's a different rule catching the URL first.

Rainer 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-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