Mobile app version of vmapp.org
Login or Join
Reiling115

: URL Rewrite for SSL I have SSL configured for a cart directory in my website. I'm having a very difficult time trying to configure SSL for a different directory within the same website. I

@Reiling115

Posted in: #Apache #Https #UrlRewriting

I have SSL configured for a cart directory in my website. I'm having a very difficult time trying to configure SSL for a different directory within the same website. I ask the question on SO, and was hoping it would eventually get migrated here for more help (I don't want to make the same post twice).

Anyway, after awhile I noticed the directory I need SSL on, /admin, is actually accepting both http and https, so now to make my life easier and get this out of the way.. I'm just trying to configure a URL Rewrite for
www.shop.com/admin/index.php
to rewrite to
www.shop.com/admin/index.php
This is what I have tried, and it is not working:

RewriteEngine on
RewriteRule ^https://www.shop.com/admin/index.php$ www.shop.com/admin/index.php

How can rewrite the default page for this directory to use https? I know this is probably sloppy, but I don't know what else to do. If you could help me set up ssl legitly for this directory, that would be even better.

ps - The url rewrite docs are complicated!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling115

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ravi8258870

Try this:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} admin
RewriteRule ^(.*)$ www.shop.com/admin/ [R,L]


You may need to replace the with just index.php instead.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme