WebSite X5Help Center

 
Philip B.
Philip B.
User

Htaccess file is rewritten each time website is uploaded  en

Autor: Philip B.
Visited 612, Followers 1, Udostępniony 0  

I have created an htaccess file to always refer visitors to https for my SSL enabled site.

When I upload site updates my htaccess file is overwritten with the website X5 default version minus the code for https referal.

how can I prevent this from happening or include my htaccess file in the upload ?

Posted on the
2 ODPOWIEDZI - 1 POMOCNY
Claudio D.
Claudio D.
Moderator
Najlepszy Użytkownik miesiąca IT

basta scrivere il proprio codice sotto alla scritta "# WebSite X5 - End Code" ed il tuo codice aggiuntivo non verrà sovrascritto.

---------

if you want to preserve your code...

...write your code here below "# WebSite X5 - End Code" , and WebsiteX5 will doesn't overwritten:

Czytaj więcej
Posted on the from Claudio D.
Philip B.
Philip B.
User
Autor

Thank you Claudio

I updated my .htaccess file as you suggested and got a message when uploading the website from X5Pro to the effect that the htaccess file would be overwritten but when checking it seems my code was preserved - many thanks

Phil

# WebSite X5 - Start Code [do not edit]


# WebSite X5 - End Code
#Rewrite everything to https

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Czytaj więcej
Posted on the from Philip B.