SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Apr 2001
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Prevent https from loading?

    Hi,

    I took a long break from webdesign but recently jumped back into it. I'm building a website and installed a SSL cert for my shopping cart but I have a problem.

    Is there a way to prevent or redirect a person to another page if someone attempts to load https outside my store directory?

    So basically I want https://www.mydomain/store/ to work, but I don't want https://www.mydomain.com to work because I have non-secure links and people going there will have problems if they add the s. I'm also affraid of duplicate content problems if search engines see the website under https also.

    I don't know if the problem is with the SSL cert, or with htaccess, or something I'm missing all together.

    Thanks

  2. #2
    SitePoint Member
    Join Date
    May 2010
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe you could do this using mod_rewrite in Apache. Try googling mod_rewrite to see if you can find some info

  3. #3
    SitePoint Evangelist smftre's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or you could have a server side script (php) do a check on index to see if the site is on HTTPS, if so then redirect to HTTP along with all the URI info.

    So if I go to https://www.mydomain.com/?foobar then it will redirect me to http://www.mydomain.com/?foobar


    Get my drift?
    Statvoo.com The Website Traffic Monitor
    The best way to monitor traffic to your sites for free!


    Web Development London UK We make web 3.0 applications


Bookmarks

Posting Permissions

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