adriangillitt Posted June 17, 2013 Share Posted June 17, 2013 Hi all, i am trying to get a redirect working on the htaccess file without much success. Can anyone help me, here is the start of my current htacess file, can you see where i need to add the redirect? # ~~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} ^littleprints.net$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] As i say i have tried the usual answers people have posted but it does not seem to work for my website, any help appreciated. Thanks Adrian Link to comment Share on other sites More sharing options...
vekia Posted June 18, 2013 Share Posted June 18, 2013 what you exactly want? what kind of redirect? from? to? Link to comment Share on other sites More sharing options...
adriangillitt Posted June 18, 2013 Author Share Posted June 18, 2013 Hi Vekia thanks for your reply, i would like www.littleprints.net to redirect to littleprints.net does that make sense? Link to comment Share on other sites More sharing options...
vekia Posted June 18, 2013 Share Posted June 18, 2013 use this htaccess rewrite condition: RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] Link to comment Share on other sites More sharing options...
adriangillitt Posted June 18, 2013 Author Share Posted June 18, 2013 Hi Vekia, i think i have tried this code before with no success, here is the modified file i have, do i need to delete something?? # ~~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} ^littleprints.net$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] Link to comment Share on other sites More sharing options...
vekia Posted June 18, 2013 Share Posted June 18, 2013 use code as a first rule, right after RewriteEngine on Link to comment Share on other sites More sharing options...
adriangillitt Posted June 19, 2013 Author Share Posted June 19, 2013 Hi Vekia, i have done as you indicated and it is still not working..... any ideas? thx Link to comment Share on other sites More sharing options...
vekia Posted June 19, 2013 Share Posted June 19, 2013 wierdy what PS shop version you use? Link to comment Share on other sites More sharing options...
adriangillitt Posted June 19, 2013 Author Share Posted June 19, 2013 Hi Vekia, i am running PrestaShop™ 1.5.4.1 Let me know if there is anything else i can try. Thanks for your help so far, greatly appreciated. Link to comment Share on other sites More sharing options...
adriangillitt Posted June 27, 2013 Author Share Posted June 27, 2013 Hi vekia, just so that you know i got my website provider to add a A-record and all is now working along with the code you entered above thanks!! Link to comment Share on other sites More sharing options...
vekia Posted June 27, 2013 Share Posted June 27, 2013 thanks for information! it's great news that you solved it! im going to mark this thread as [solved] regards! 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