1 Replies - 673 Views - Last Post: 11 February 2013 - 11:19 AM

#1 icedd  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 98
  • Joined: 04-March 08

HTTP - HTTPS error with subdomain

Posted 11 February 2013 - 10:53 AM

So I have a bit of an odd issue. My website is Rivalus.net. I am doing some testing and need to use a subdomain to hold a test version of my website for testing checkout on my shopping cart. I need to post values to Moneris, but it MUST come from HTTPS.

I made a subdomain (dev) and pointed to a folder on the server (where I copied my entire site to for testing) and that works great. www.dev.rivalus. The dev foler is "/dev". So basically I just copied "/" to "/dev".

Here is my issue. When I visit, http://dev.rivalus.net it shows the contents of "/dev" no problem. But when I use httpS://dev.rivalus.net it shows the contents of "/" not "/dev" for some reason.

Here's the catch, My SSL doesn't support wildcards (at this moment). Is it getting messed up / redirect for that reason or because of something wrong in my .htaccess file?

.HTACCESS FILE in "/"

RewriteOptions inherit
ErrorDocument 401 /404.php
ErrorDocument 403 /404.php
ErrorDocument 404 /404.php

Options -Indexes
RewriteEngine On
#RewriteCond %{REMOTE_ADDR} !^142\.177\.163\.211$
#RewriteRule !^maintenance.html$ /maintenance.html [R=302,L]

#directories to not rewrite
RewriteRule ^(contractors) - [L]

#force http://www. to make sure SESSION data is always the same
#RewriteCond %{HTTPS} off
#RewriteCond %{HTTP_HOST} !^www\.
#WRewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R,L]

#force https://www. to make sure SESSION data is always the same
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R,L]

#seo optimized product urls
RewriteRule ^products/rapid-fx products/rapidfx [L]
RewriteRule ^products/post-rx products/postrx [L]
RewriteRule ^products/anabolic-prescription products/anabolicprescription [L]
RewriteRule ^products/hyperbolic-formula products/hyperbolicformula [L]
RewriteRule ^products/helix-24 products/helix24 [L]
RewriteRule ^products/clean-gainer products/cleangainer [L]
RewriteRule ^products/qwk-kit products/qwkkit [L]
RewriteRule ^products/short-cutz products/shortcutz [L]
RewriteRule ^products/ap-kit products/apkit [L]
RewriteRule ^products/powder-burn products/powderburn [L]
RewriteRule ^products/think-fast products/thinkfast [L]
RewriteRule ^products/creatine-conqr products/creatineconqr [L]
RewriteRule ^products/last-meal products/lastmeal [L]

#seo optimized page urls
RewriteRule ^aboutus about-us [L]

#rewrites for athletes and products viewing different tabs
RewriteRule ^products/([^/]+)/([^/]+).html products/details/index.php?product=$1&option=$2 [L]
RewriteRule ^athletes/([^/]+)/([^/]+).html products/details/index.php?athlete=$1&option=$2 [L]

#rewrites for athletes and products
RewriteRule ^products/([^/]+) products/details/index.php?product=$1 [L]
RewriteRule ^athletes/([^/]+) products/details/index.php?athlete=$1 [L]

#rewrites for news articles
RewriteRule ^news/articles/([^/]+).html news/view-article.php?headline=$1 [L]

#rewrites for news feeds
RewriteRule ^news/rss/([^/]+) news/feed.php?id=$1 [L]
RewriteRule ^news/rss news/feed.php?id=main [L]

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^shortcutz$ "http\:\/\/www\.rivalus\.net\/products\/shortcutz" [R=301,L]

RewriteCond %{HTTP_HOST} ^rivalus\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.rivalus\.net$
RewriteRule ^guarantee\/?$ "http\:\/\/www\.rivalus\.net\/about\-us" [R=301,L]




Thanks for your help.

PS: And if your so inclined to see what I mean. about the wrong redirection.

At: http://www.rivalus.net the first image in the slider will work.
At: http://www.dev.rivalus.net the first image in the slider will not, which tells your its the dev. (because they have diffeent image folers)
At https://www.dev.rivalus.net the first image will work again becaue its actually pulling from "/"

Ugh, thanks for ANY suggestions.!

Is This A Good Question/Topic? 0
  • +

Replies To: HTTP - HTTPS error with subdomain

#2 TheKirk  Icon User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 58
  • Joined: 10-February 13

Re: HTTP - HTTPS error with subdomain

Posted 11 February 2013 - 11:19 AM

Edit:

Well if Apache is running on the same port, machine and IP it will be configured to take the requested address and look through its configs. You have added http://subdomain.site.com but maybe it sees https://subdomian.site.com as a different request and unless an alias is setup in your config files to point to http://subdomian.site.com it can't find a match and just puts on the default site (site.com).

This post has been edited by TheKirk: 11 February 2013 - 11:20 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1