Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Mod rewrite & https

getting mod rewrite to work with https



3:01 am on Jun 12, 2003 (gmt 0)

10+ Year Member

I have several very basic mod rewrite rules set up that are working great until somebody gets into the secure section of my site. I have my links set up to link to as an example: /store.html which is rewritten as:
rewriteRule ^store\.html$ /store/customer/home.php [L]

The problem is that when the customer is in a secure part of the site, the link becomes [site.com...] instead of just [site.com...] and with the https in front, the URL isn't getting rewritten.

Rather than make all of the hyperlinks absolute links with [site.com...] in front, I would like to just get apache mod rewrite to parse this out.

Any thoughts from the rewrite gurus?



2:06 pm on Jun 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Welcome to WebmasterWorld, kosmic1. :)

It seems the mod_rewrite gurus overlooked your post. Although someone may post some code for you, we encourage members to create their own solutions and prefer to help them refine their solutions.

To that end, try this Intro to Redirects [webmasterworld.com] and see what you can come up with.

We'll help you refine it. I promise!


11:58 pm on Jun 14, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member


When you are using HTTPS, I don't think mod_rewrite is going to work, since it deals only with HTTP requests.

Also, there may be security issues with allowing rewrites in secure server space - It would not surprise me if the non-functionality of mod_rewrite with HTTPS protocol was intentional.

I don't have any experience with this, and no secure servers to test on, so this should be read as opinion only...



7:37 pm on Jun 15, 2003 (gmt 0)

10+ Year Member

Thanks to both of you. I couldn't find anything to do with https in mod rewrite in my research. So, I just changed the links from /whatever.html to [site.com...] -- It's a minor annoyance, since I tend to develop a site first with the IP address then add the domain name. Minor only though. :-)

Thanks for the replies.



Featured Threads

Hot Threads This Week

Hot Threads This Month