Solved

Modify incorrectly formed https url .. Help ?

Posted on 2006-11-26
2
205 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 450 total points
Comment Utility
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
Comment Utility
Yes.

Many thanks,

Chris.


0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now