Page 1 of 1

Help with .htaccess

Posted: Sat Oct 13, 2018 9:56 pm
by ketsap
Hi I work with opencart 3.1 and my final goal is to redirect all non-www urls to www url. First I read that I can do this from .htaccess file. So because it wasn't to my directory /public_html I took the htacceess.txt and pasted it from opencart repo to my directory ( /public_html ) and rename it .htaccess. Inside I read that I should enable mod_rewrite to the apache server. The problem is that I can't find where I can change that.Is it enable the mod_rewrite by default?
Also now that I have move the htaccess file I get a 500 error.

Final inside the htaccess file it has this line of code
# If your opencart installation does not run on the main web folder make sure you folder it does run in
ie. / becomes /shop/

I can not understand that it is doing. should I change it to something else?
Thank you George.

Re: Help with .htaccess

Posted: Sun Oct 14, 2018 9:42 pm
by IP_CAM
# If your opencart installation does not run on the main web folder, make sure you folder it does run in
ie. / becomes /shop/

Code: Select all

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder,
# but in a Subdirectory /cart/, make sure your folder / becomes /cart/
RewriteBase /cart/

Code: Select all

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder,
# but in a Subdirectory /shop/, make sure your folder / becomes /shop/
RewriteBase /shop/

Code: Select all

# SEO URL Settings
RewriteEngine On
# If your opencart installation does run on the main web folder,
# make sure you folder does run in:
RewriteBase /
understud ? :D
Ernie