?
Solved

Modify incorrectly formed https url .. Help ?

Posted on 2006-11-26
2
Medium Priority
?
215 Views
Last Modified: 2010-05-18
My .htaccess look like this ..

# Correct incorrect URLs
# ----------------------
Options +FollowSymLinks
RewriteEngine on

# Make complete URL ... i.e. if a shortened  url is give ..
RewriteCond %{HTTP_HOST} !^www\.jennifersofwalsall\.co\.uk$         [NC]
RewriteRule ^(.*)$ http://www.jennifersofwalsall.co.uk/$1                   [R=301]

# Always use SSL in store , if a request is to the store force "https"        
RewriteCond %{HTTPS} off
RewriteRule store/(.*) https://www.jennifersofwalsall.co.uk/store/$1     [NC,R=301]

# Correct possible additional trailing slash caused by previous rewrite  ..
RewriteCond %{HTTPS} on
RewriteRule store//(.*) https://www.jennifersofwalsall.co.uk/store/$1    [NC,R=301]

##############
The above seems to work pretty well but the following does not, i want to rewrite
"https://myname.com"  as  "https://www.myname.com"   (i.e. The SSL certification requires a properly formed url).

I have tried,
    various things including port 443 but so far without success.

Please Help !

ChrisColeman.


 





0
Comment
Question by:ChrisColeman
2 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 1800 total points
ID: 18017676
It will not work. Note, that SSL/TLS session takes place before rewrite may access the data - the data rewrite want to access is already transmitted within secure channel.

So if client will enter https://myname.com it will be warned about wrong cert anyway. If s/he accepts, then can be redirected to proper URL.

Also, I would change
> RewriteCond %{HTTPS} off
RewriteCond %{HTTPS} !on
0
 

Author Comment

by:ChrisColeman
ID: 18018629
Yes.

Many thanks,

Chris.


0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question