Solved

Modify incorrectly formed https url .. Help ?

Posted on 2006-11-26
2
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 450 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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