homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Mod rewrite & https
getting mod rewrite to work with https

10+ Year Member

Msg#: 236 posted 3:01 am on Jun 12, 2003 (gmt 0)

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 https://site.com/store.html 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?




WebmasterWorld Senior Member 10+ Year Member

Msg#: 236 posted 2:06 pm on Jun 14, 2003 (gmt 0)

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!


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

Msg#: 236 posted 11:58 pm on Jun 14, 2003 (gmt 0)


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



10+ Year Member

Msg#: 236 posted 7:37 pm on Jun 15, 2003 (gmt 0)

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.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved