Jump to content

[solved] Redirect not working


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...