Author Topic: htaccess on public_html error  (Read 4779 times)

Offline varywise

  • Newbie
  • *
  • Posts: 7
  • Karma: +2/-0
    • View Profile
htaccess on public_html error
« 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]


Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: htaccess on public_html error
« Reply #1 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]

“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline varywise

  • Newbie
  • *
  • Posts: 7
  • Karma: +2/-0
    • View Profile
Re: htaccess on public_html error
« Reply #2 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.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: htaccess on public_html error
« Reply #3 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

Offline varywise

  • Newbie
  • *
  • Posts: 7
  • Karma: +2/-0
    • View Profile
Re: htaccess on public_html error SOLVED
« Reply #4 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!

 

Powered by SMFPacks Social Login Mod