views:

141

answers:

2

I've browsed through several questions on the site and nothing quite matched what I want to do.

I found 1 question that could possible work the best as long as it does neglect SSL on any of the links within the specific folder I want to avoid having SSL on. (http://stackoverflow.com/questions/724968/force-redirect-to-ssl-for-all-pages-apart-from-one)

Basically what I need is this-

I need the link on my site for '.../store' to remain with SSL off, but I want to force SSL for everything else in the store, most specifically '.../store/index.php?xlspg=checkout'.

The reason I need the /store link to remain with SSL off is because it conflicts with the admin panel login. That is the only direct link that cannot have SSL, so I'm also not sure which would be the best way to handle this.

The link to another question on this site that I posted above seems like it would work, like I said, as long as it doesnt affect anything deeper into the store aside from that sole page itself.

Any help would be greatly appreciated!!!

A: 

Can you instead construct your link to the admin panel to avoid using SSL? For example, if your admin panel link is something like:

<a href="/admin">Admin panel</a>

change it instead to:

<a href="http://example.com/admin"&gt;Admin panel</a>

Then you can use SSL by default, except for the admin panel.

Greg Hewgill
Unfortunately, I cant. The admin panel for this store is built into the desktop software. The only ways I can think of is either to neglect the /store link only, or force the checkout link to use SSL. I'm a complete novice when it comes to mod-rewrites so I have no idea what to do. =/
Nick
A: 

Try this rule:

RewriteCond %{HTTPS} !=on
RewriteRule ^store/index\.php$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Gumbo
I tried this in an htaccess file in the root directory and unfortunately it didnt do anything at all. :(
Nick