AllisonF Posted November 22, 2009 Share Posted November 22, 2009 Hello, I am building an OSCommerce site for a customer. Their current site is on the hosting space and has index.html which is what appears if you just type the domain in. That's what I want for now, while I'm getting the new site all set up and configured. The new site lives in the site root too but of course the home page is index.php so will only show in a browser if I type that in at the end of the domain. I got my hosting company to install the SSL certificate last Thursday. Today I sat down and started altering the config files to get everything hooked up right. I had a few probs and a bit of trial and error and have spent most of the day looking at the various instructions on the forum. I thought it was all sorted, but I wanted it so that if someone typed in http://websitename.co.uk it would automatically go to https://websitename.co.uk and this wasn't happening. However when I physically typed in the https it seemed to be working. I got on to the hosting company and they told me to put this in the .htaccess file: ReWriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.domain.com [L,R] So I did this and it seemed to work! if you just type http://websitename.co.uk it goes to https://...etc and if I put http://websitename.co.uk/index.php then my OSC home page comes up and it's got the https:// in the address bar. Trouble is, when I click on any links on the home page menu it just goes straight to the current homepage, index.html There are other .htaccess files throughout the site - should I have altered these too? Can anyone tell me where I'm going wrong please? PLease be gentle - I'm a noob! Many thanks Allison Link to comment Share on other sites More sharing options...
web-project Posted November 22, 2009 Share Posted November 22, 2009 try the following code in your .htaccess file RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://www.domain.com/%{REQUEST_URI} Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
AllisonF Posted November 23, 2009 Author Share Posted November 23, 2009 Many thanks. That seems to work fine! In the address bar there is an extra slash though: https://www.domain.com//index.php Is this correct? When I finally make the site live do I need to remove this code from the .htaccess file or change it in any way? Thanks Allison Link to comment Share on other sites More sharing options...
web-project Posted November 23, 2009 Share Posted November 23, 2009 https://www.domain.com/%{REQUEST_URI} as you can see from above after slash any request. https://www.domain.com//index.php this is cased by incorrect setup of configure.php file (simply check paths) Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.