Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL not working on www need help to redirect hyperlinks


carfer35

Recommended Posts

I have an OScommerce store and just recently, a mobile version of my store was created.  Desktop and mobile sites are two different coded websites.  The mobile site is in a subfolder.  I recently upgrade the SSL to a wildcard SSL in order to secure the subdomain or new mobile site. 

 

The problem I have is that the certificate will not work for https://www.mobile.example.com I tried to redirect to https://mobile.example.comusing a tool to redirect from my web host C panel but there is a problem.  The tool to redirect works just fine in that it will redirect from http:www.mobile to https://mobile.example.com but once that is done, what it displays in the mobile devices is the desktop site, not the mobile, even if in the URL shows https://mobile.example.com

Link to comment
Share on other sites

Hosting control panel redirections tend to be very weak when handling all but the simplest situations. It's quite possible that your control panel did not set up your URL rewrites correctly in the .htaccess file (assuming you're using an Apache server). If you post here your .htaccess, or at least the relevant parts of it (pertaining to the rewrite), maybe we can help. Be sure to obscure/change any sensitive information. You can replace your real domain with example.com if you want to.

Link to comment
Share on other sites

Hi MrPhil

 

Thanks for the reply.   here is a copy of the files one is for desktop and one for mobile site

 

#htaccess for Desktop

 

RewriteEngine on

RewriteCond %{HTTP_HOST} ^example\.com$ [OR]

RewriteCond %{HTTP_HOST} ^www\.example\.com$

RewriteRule ^/?$ "http\:\/\/example\.com\/" [R=301,L]

 

# Begin Ultimate SEO V2.2d

# For security reasons, Option followsymlinks cannot be overridden.

#Options +FollowSymLinks

Options +SymLinksIfOwnerMatch

 

  # RewriteBase instructions

  # Change RewriteBase dependent on how your shop is accessed as below.

  # http://www.mysite.com= RewriteBase /

  # http://www.mysite.com/catalog/= RewriteBase /catalog/ 

  # http://www.mysite.com/catalog/shop/= RewriteBase /catalog/shop/

 

  # Change the following line using the instructions above 

 

RewriteBase /

 

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}

# End Ultimate SEO V2.2d

RewriteCond %{HTTP_HOST} ^ example\.com$ [OR]

RewriteCond %{HTTP_HOST} ^www\. example\.com$

RewriteRule ^(.*)$ "http\:\/\/example\.com\/$1" [R=301,L]

 

Mobile file

 

RewriteEngine on

 

# BlueHost.com

#.htaccess WildCard SSL

#RewriteCond %{REQUEST_URI} !^/mobile/

#RewriteCond %{REQUEST_FILENAME} !-f

#RewriteCond %{REQUEST_FILENAME} !-d

 

#RewriteEngine On

#RewriteCond %{HTTPS} off

#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

       

RewriteBase /

 

 

Thanks again for your help

Link to comment
Share on other sites

So, what exactly are you trying to accomplish between these two .htaccess files? Are all http: (non-SSL) supposed to be changed to https: (SSL), or the protocol left unchanged? Are your store's links set up as https: (SSL) for both HTTP_* and HTTPS_*, or are they http: and https:?

 

You have two very similar sections of code that change example.com and www.example.com to http://example.com. Only the first one should be necessary. I think though, that as currently written it will change https: to http:. What exactly are you trying to achieve?

 

The mobile's .htaccess does nothing useful, as most of the commands are commented out.

 

For both desktop and mobile, are SEO URLs being successfully changed to dynamic form? The root .htaccess should always be processed first, and then the mobile (if its directory is under the root).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...