On November 10, 2011 14:41 , Nick Tkach <ntkach@xxxxxxxxx> 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.htmlThe 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 mark@xxxxxxxxxxx --------------------------------------------------------------------- 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