GoCastaway58 Posted December 23, 2020 Posted December 23, 2020 Hi all, I have shop that was running perfect on a dedicated server. Now i placed it again on an other dedicated server, and the URL is not working OK anymore. When i type the URL without HTTPS (oneillbrothers.co.uk) or (www.oneillbrothers.co.uk) then i get an internal server error and this in my browser with a double URL: https://oneillbrothers.co.uk/oneillbrothers.co.uk/ When i type it https://oneillbrothers.co.uk then the shop works perfect. Does someone know a solution for this problem? Thanks! .htaccess
Jack_mcs Posted December 24, 2020 Posted December 24, 2020 There are two mistakes in your .htaccess file. 1 - You are telling it to redirect example.com 2 - Your shop is located in the shop directory but your RewriteBase entry doesn't show that. I don't know if fixing those will fix your problem but they will definitely cause failures. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
GoCastaway58 Posted December 24, 2020 Author Posted December 24, 2020 8 hours ago, Jack_mcs said: There are two mistakes in your .htaccess file. 1 - You are telling it to redirect example.com 2 - Your shop is located in the shop directory but your RewriteBase entry doesn't show that. I don't know if fixing those will fix your problem but they will definitely cause failures. Hi Jack, Thanks for your reply! You are right, i have also seen the example.com, but on the other server i didn't had this problem. I am not really in .htacces code so i don't know what i have to do with it. I did many searching about it but there is so much to find that i don't see the wood trough the trees....
Jack_mcs Posted December 24, 2020 Posted December 24, 2020 @GoCastaway58The attached file should work. But it has a command to use php 5.6 so if your account is not using 5.6, that could be a problem. .htaccess Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
GoCastaway58 Posted December 25, 2020 Author Posted December 25, 2020 20 hours ago, Jack_mcs said: @GoCastaway58The attached file should work. But it has a command to use php 5.6 so if your account is not using 5.6, that could be a problem. .htaccess Hi Jack, Thank you very much for the .htaccess, but i am sorry to say that it's not resolving the issue For now Merry Xmas, will take a look later...
zeeshop Posted December 28, 2020 Posted December 28, 2020 Hi, I used below code in .htaccess, and website seems to be using SSL on all pages: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.domain.tld/$1 [R,L] </IfModule> IMPORTANT: Replace domain.tld with your domain.
aayushi98 Posted December 28, 2020 Posted December 28, 2020 Check the path as url is not redirecting to the page you want
GoCastaway58 Posted December 29, 2020 Author Posted December 29, 2020 Thanks all for the reply's. We already tried a lot of things but nothing is working, never had this before. The exact same shop with other name/products is running on the same server and works fine. Already took the .htaccess from there and replaced the domain but no succes.
Jack_mcs Posted December 29, 2020 Posted December 29, 2020 @GoCastaway58Please post your includes/configure.php file here but be sure to remove the database credentials. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
GoCastaway58 Posted December 30, 2020 Author Posted December 30, 2020 14 hours ago, Jack_mcs said: @GoCastaway58Please post your includes/configure.php file here but be sure to remove the database credentials. Hi Jack, Thanks for your help but it's already fixed. The shop was placed in a the subfolder "shop" because we wanted to do something with the first page but we don't do that. So i placed the shop in the root and now everything works fine :) #redirect index.php to root RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ https://oneillbrothers.co.uk/$1 [R=301,L] #redirect non-www to www RewriteCond %{HTTP_HOST} ^example\.com RewriteRule ^(.*)$ https://oneillbrothers.co.uk/$1 [R=permanent,L] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://oneillbrothers.co.uk/$1 [R,L] Have a good New Year! Thanks!
GoCastaway58 Posted December 30, 2020 Author Posted December 30, 2020 Also thanks to the others who replied with a solution. Happy New Year!
Jack_mcs Posted December 30, 2020 Posted December 30, 2020 1 hour ago, GoCastaway58 said: RewriteCond %{HTTP_HOST} ^example\.com Glad to hear you got it to work. But if the above is still in the file, it is wrong and should be fixed. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
GoCastaway58 Posted December 30, 2020 Author Posted December 30, 2020 6 hours ago, Jack_mcs said: Glad to hear you got it to work. But if the above is still in the file, it is wrong and should be fixed. Yep, you are right. Didn't notice that but is already fixed. The problem was in: RewriteRule ^index\.php$ https://oneillbrothers.co.uk/$1 [R=301,L] After https://oneillbrothers.co.uk/ there was no $1(space) so i added that. Kind regards!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.