thrivenutrition Posted January 25, 2013 Share Posted January 25, 2013 I am running 1.5.2 and have been trying to solve this bloody problem. My site is registered under the "mysite.ca" URL. On the front end of the site it sometimes displays as www.mysite.ca and other times mysite.ca Upon logging in this displays on my dashboard: You are currently connected with the following domain name: www.mysite.ca This is different from the main shop domain name set in "Multistore" page under the "Advanced Parameters" menu: mysite.ca Click here if you want to modify the main shop domain name Here is my .htaccess file: # Use PHP5 Single php.ini as default AddHandler application/x-httpd-php5s .php # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^mysite.ca$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" </IfModule> FileETag INode MTime Size <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again Any suggestions on how to fix this URL re-direct issue? Link to comment Share on other sites More sharing options...
Carlsen Posted January 26, 2013 Share Posted January 26, 2013 Hi Thrivenutrition, I am using this code for all my projects, which also uses the webservice. It works like a charm for me. RewriteCond %{HTTP_HOST} ^http://[color=#ff0000]mysite.ca[/color] RewriteRule (.*) http://www.[color=#ff0000]mysite.ca[/color]/$1 [R=301,L] Link to comment Share on other sites More sharing options...
thrivenutrition Posted January 26, 2013 Author Share Posted January 26, 2013 HI Carlsen, I tried using this code and nothing seemed to change. Any other thoughts? Link to comment Share on other sites More sharing options...
Carlsen Posted January 28, 2013 Share Posted January 28, 2013 Hi again, You can try making the redirect in your DNS settings instead. Link to comment Share on other sites More sharing options...
El Patron Posted January 28, 2013 Share Posted January 28, 2013 Try this: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] </IfModule> if you have 1.5 you can use my Apache .htaccess module to update. here Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now