AbanteCart Community

eCommerce construction => Installation and Configuration => Topic started by: varywise on June 17, 2017, 06:23:57 PM

Title: htaccess on public_html error
Post by: varywise on June 17, 2017, 06:23:57 PM
Hi Guys,

In need of ****** help, i tried editing my htaccess file, idiotic move, did not back the original up. Now I dont have the original copy of the last line, so the site is redirecting incorrectly, or if it does, the product pages do not. Please please assist. A snippet of what i have can be found below. The last line of code is INCORRECT.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$

====INCORRECT CODE ==============
RewriteRule ^(.*)$ "https\:\/\/domain\.com\/index\.php\/?" [R=301,L]

Title: Re: htaccess on public_html error
Post by: eCommerce Core on June 18, 2017, 09:53:45 PM
Here is the link to original .htaccess file:
https://github.com/abantecart/abantecart-src/blob/master/public_html/.htaccess.txt

I am not very clear what you need to do, but if you like to redirect to different domain, correct line is this:
Code: [Select]
RewriteRule ^(.*)$ https://domain.com [R=301,L]

Title: Re: htaccess on public_html error
Post by: varywise on June 19, 2017, 02:17:23 AM
Hii, thanks for the snipped but still no luck  :( :(. Im editing the htaccess.access and not the txt. Could i be doing something wrong? Sorry I am really new to this. Its not loading the page at all.
Title: Re: htaccess on public_html error
Post by: Basara on June 19, 2017, 03:41:43 AM
Hii, thanks for the snipped but still no luck  :( :(. Im editing the htaccess.access and not the txt. Could i be doing something wrong? Sorry I am really new to this. Its not loading the page at all.

Hello. The correct name of file is .htaccess and not htaccess.access  ;)
If you are looking for default AbanteCart htaccess rules you can always find it in github https://github.com/abantecart/abantecart-src/blob/master/public_html/.htaccess.txt
Title: Re: htaccess on public_html error SOLVED
Post by: varywise on June 20, 2017, 03:35:54 AM
Hi guys,

Thanks for the replies and it was such a silly error, the core folder was missing. Once added i just renamed the htaccess.txt to htaccess and solved!