Results 1 to 7 of 7

Thread: Redirect to SSL

  1. #1

    Default Redirect to SSL

    Hi all,

    Is it possible to redirect only a single subfolder to ssl?

    For example, I would like http://www.mysite.com/test/ to always be automatically redirected to https://www.mysite.com/test/

    Thanks for any help you can give.

  2. #2

    Cool

    Hi,

    Yes, it is possible to redirect single sub-directory to SSL.
    You can set it from cPanel >> Redirects Option.

  3. #3
    Join Date
    Nov 2005
    Location
    Earth
    Posts
    629

    Default

    You can also achieve this with mod_rewrite rules.

  4. #4

    Default

    Quote Originally Posted by eUK-Ralf View Post
    Hi,

    Yes, it is possible to redirect single sub-directory to SSL.
    You can set it from cPanel >> Redirects Option.
    I tried that, but I get this error message:
    Code:
    Redirect Loop   
    
    Redirection limit for this URL exceeded.  Unable to load the requested page.  This may be caused by cookies that are blocked.  
    
    The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete.
    
    *  Have you disabled or blocked cookies required by this site?
    *  NOTE: If accepting the site's cookies does not resolve the problem, it is probably a server configuration issue and not your computer.
    This is the only redirect I have on my site, so not sure why it gets caught in a loop

  5. #5

    Default

    Anyway, the following .htaccess works for me:

    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{REQUEST_URI} /test
    RewriteRule ^(.*)$ https://www.mysitecom/test/$1 [R,L]

  6. #6
    Join Date
    Nov 2005
    Location
    Earth
    Posts
    629

    Smile

    Hi JonoB,

    Thanks for putting your rules here, it will help many others.

  7. #7

    Default

    someone alredy post how woild i answer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •