Post by ketsap » Sat Oct 13, 2018 9:56 pm

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.

Newbie

Posts

Joined
Sat Oct 13, 2018 9:41 pm

Post by IP_CAM » Sun Oct 14, 2018 9:42 pm

# 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

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: Baidu [Spider] and 182 guests