Jump to content

How to make custom rewrite engine on htacess permanent


tanureja

Recommended Posts

Hi, 

 

Tried to search the forum but can't find the same issue addressed. 

 

I always got redundant hostnames from google analytics to find out my custom rewrite engine below :

 

==

#Domain: sukucadangmotor.com
RewriteCond %{HTTPS} off
RewriteRule (.*) https://sukucadangmotor.com%{REQUEST_URI} [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^www.sukucadangmotor.com [NC]
RewriteRule (.*) https://sukucadangmotor.com%{REQUEST_URI} [L,R=301,NC]
==
 
got changed to default prestashop rewrite engine setting :
 
 
==
#Domain: sukucadangmotor.com
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]
==
 
This caused redundant hostnames in google analytics.
 
Really appreciate your help on how to make this setting permanent so I won't have the same problem everytime I clear cache or recreate friendly url. Thanks a lot.
 
Edited by tanureja (see edit history)
Link to comment
Share on other sites

PrestaShop have 2 lines in the .htaccess file, inside these lines include their code, but you can write your own code outside of these lines and will remain even when the .htaccess is regenerated.

# 
# You can write your custom code here
#

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

# Here is writed the PrestaShop code

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

# 
# Also here, you can write your custom code
#
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...