Re: [users@httpd] Consequences of https to https rewrites?

2011-11-23 Thread Igor Galić


- Original Message -
> I've been looking at a particular problem and it's one of those ones
> that's just really hard to describe in unique terms for a search
> (maybe no one else has hit it before :).  Been Googling all over
> trying to find details on any consequences/side-effects of using
> mod_rewrite to redirect secure urls to other secure urls on the same
> site.  Something like
>
> RewriteRule ^https://mycom.com/specialsale
> https://mycom.com/content/some/url/page.html


http://httpd.apache.org/docs/trunk/mod/mod_alias.html#alias

Alias /specialsale /content/some/url/page.html

i
--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

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



Re: [users@httpd] Consequences of https to https rewrites?

2011-11-23 Thread Matus UHLAR - fantomas

On November 10, 2011 14:41 , Nick Tkach  wrote:

RewriteRule ^https://mycom.com/specialsale
https://mycom.com/content/some/url/page.html


On 10.11.11 15:23, Mark Montague wrote:
You're complicating things too much.  In your HTTPS virtual host 
stanza in your web server configuration file, just put


RewriteRule ^/specialsale$ /content/some/url/page.html


You're complicating things much. Simple RedirectMatch should be ok 
instead of RewriteRule ;)

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
It's now safe to throw off your computer.

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



Re: [users@httpd] Consequences of https to https rewrites?

2011-11-10 Thread Mark Montague

On November 10, 2011 15:38 , Nick Tkach  wrote:

Second, we've seen that at least sometimes that seems to generate a
big spike in CPU usage "all of a sudden" once it goes live.

What seems to generate a big spike in CPU usage?  When what goes live?

When the Apache HTTPD process gets started with a rewrite like that I
meant.  I think that was unrelated though.


I agree that it is probably unrelated.  Have you done measurements 
regarding CPU usage at startup time with mod_rewrite enabled and such a 
rule versus mod_rewrite disabled?  That would (presumably) eliminate 
mod_rewrite as a cause of the problem you're seeing.


--
  Mark Montague
  m...@catseye.org


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



Re: [users@httpd] Consequences of https to https rewrites?

2011-11-10 Thread Nick Tkach
On Thu, Nov 10, 2011 at 2:23 PM, Mark Montague  wrote:
> On November 10, 2011 14:41 , Nick Tkach  wrote:
>>
>> Been Googling all over
>> trying to find details on any consequences/side-effects of using
>> mod_rewrite to redirect secure urls to other secure urls on the same
>> site.  Something like
>>
>> RewriteRule ^https://mycom.com/specialsale
>> https://mycom.com/content/some/url/page.html
>>
>>
>> First of all, does that even make sense?  I'm a little fuzzy on the
>> precise technical details of how SSL connections and http headers
>> "mix".
>
> You're complicating things too much.  In your HTTPS virtual host stanza in
> your web server configuration file, just put
>
> RewriteRule ^/specialsale$ /content/some/url/page.html
>
> The pattern for RewriteRule (the first argument) matches based on the URL
> path, not the URL.  The substitution for the RewriteRule (the second
> argument) can be a URL path, too, unless you need to redirect to a different
> site.
>
> Unless you're doing something fancy, the fact that you are redirecting a
> HTTPS URL or that you are redirecting to another HTTPS URL are irrelevant.
>  There are no consequences or side effects that I am aware of.  And HTTP
> headers are generally independent of whether the connection is secured using
> TLS/SSL or not.
>
Thanks, that's what I figured.  I just wanted to make sure I wasn't
missing something. :)

> Where mod_rewrite becomes confusing is that when you use RewriteRule in a
> .htaccess file or Directory context, the pattern gets matched against the
> filesystem path with some prefix removed, not the URL path.  You can avoid
> this by putting your RewriteRules in virtual host or Location contexts.  Or,
> even better, if you don't need the power of mod_rewrite, use the Redirect
> and RedirectMatch directives instead, since these always use the URL path.
>
>> Second, we've seen that at least sometimes that seems to generate a
>> big spike in CPU usage "all of a sudden" once it goes live.
>
> What seems to generate a big spike in CPU usage?  When what goes live?

When the Apache HTTPD process gets started with a rewrite like that I
meant.  I think that was unrelated though.
> --
>  Mark Montague
>  m...@catseye.org
>
>

Thanks for the help! :)

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



Re: [users@httpd] Consequences of https to https rewrites?

2011-11-10 Thread Mark Montague

On November 10, 2011 14:41 , Nick Tkach  wrote:

Been Googling all over
trying to find details on any consequences/side-effects of using
mod_rewrite to redirect secure urls to other secure urls on the same
site.  Something like

RewriteRule ^https://mycom.com/specialsale
https://mycom.com/content/some/url/page.html


First of all, does that even make sense?  I'm a little fuzzy on the
precise technical details of how SSL connections and http headers
"mix".


You're complicating things too much.  In your HTTPS virtual host stanza 
in your web server configuration file, just put


RewriteRule ^/specialsale$ /content/some/url/page.html

The pattern for RewriteRule (the first argument) matches based on the 
URL path, not the URL.  The substitution for the RewriteRule (the second 
argument) can be a URL path, too, unless you need to redirect to a 
different site.


Unless you're doing something fancy, the fact that you are redirecting a 
HTTPS URL or that you are redirecting to another HTTPS URL are 
irrelevant.  There are no consequences or side effects that I am aware 
of.  And HTTP headers are generally independent of whether the 
connection is secured using TLS/SSL or not.


Where mod_rewrite becomes confusing is that when you use RewriteRule in 
a .htaccess file or Directory context, the pattern gets matched against 
the filesystem path with some prefix removed, not the URL path.  You can 
avoid this by putting your RewriteRules in virtual host or Location 
contexts.  Or, even better, if you don't need the power of mod_rewrite, 
use the Redirect and RedirectMatch directives instead, since these 
always use the URL path.



Second, we've seen that at least sometimes that seems to generate a
big spike in CPU usage "all of a sudden" once it goes live.


What seems to generate a big spike in CPU usage?  When what goes live?
--
  Mark Montague
  m...@catseye.org


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



[users@httpd] Consequences of https to https rewrites?

2011-11-10 Thread Nick Tkach
I've been looking at a particular problem and it's one of those ones
that's just really hard to describe in unique terms for a search
(maybe no one else has hit it before :).  Been Googling all over
trying to find details on any consequences/side-effects of using
mod_rewrite to redirect secure urls to other secure urls on the same
site.  Something like

RewriteRule ^https://mycom.com/specialsale
https://mycom.com/content/some/url/page.html


First of all, does that even make sense?  I'm a little fuzzy on the
precise technical details of how SSL connections and http headers
"mix".  I've dealt with SSL and Apache in general in the past and have
some knowledge of SSL handshakes/negotiations, but the precise
technical details I've not had the "pleasure" of dealing with very
often.

Second, we've seen that at least sometimes that seems to generate a
big spike in CPU usage "all of a sudden" once it goes live.


Any thoughts?

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