Post by BuzyBee » Thu Jun 25, 2015 9:17 am

I made a fresh opencart install yesterday..

My website is under my sub folder and I don't have a htaccess file in either the root, or subfolder...

Is this normal? Do I need to add one?

New member

Posts

Joined
Sat Jun 20, 2015 10:10 am

Post by IP_CAM » Thu Jun 25, 2015 10:31 am

sure you do, it's called .htaccess.txt by default, and has to be renamed to .htaccess ,
if it shall be activated. If you plan to use SEO URL's, you'll need it anyway, and for
general Browser Performance enhancement, a well done modified .htaccess can be downloaded here:
http://www.opencart.com/index.php?route ... n_id=15448
In addition, to BLOCK or reroute Visitors, Bot's, Intruders, even whole Countries, for this, .htaccess entrie's
are made, to filter / lock-out / redirect such IP's, even whole IP-Ranges.

Be aware to adapt it to your SHOP Directory:

Code: Select all

# If using subdirectory, update RewriteBase /
# Example: Store URL: ipc.li/shop
# Update to: RewriteBase /shop/
# SEO URL Settings

RewriteEngine On
RewriteBase /shop/
.htaccess is placed in the 'Site/Shop/' ROOT, where the Shop Index.php file is located.
Good Luck ;)
Ernie
ipc.li/cart/

PS: Next time, tell us FIRST, what exact OC Version you use :-\

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

Post by BuzyBee » Thu Jun 25, 2015 12:39 pm

IP_CAM wrote:sure you do, it's called .htaccess.txt by default, and has to be renamed to .htaccess ,
if it shall be activated. If you plan to use SEO URL's, you'll need it anyway, and for
general Browser Performance enhancement, a well done modified .htaccess can be downloaded here:
http://www.opencart.com/index.php?route ... n_id=15448
In addition, to BLOCK or reroute Visitors, Bot's, Intruders, even whole Countries, for this, .htaccess entrie's
are made, to filter / lock-out / redirect such IP's, even whole IP-Ranges.

Be aware to adapt it to your SHOP Directory:

Code: Select all

# If using subdirectory, update RewriteBase /
# Example: Store URL: ipc.li/shop
# Update to: RewriteBase /shop/
# SEO URL Settings

RewriteEngine On
RewriteBase /shop/
.htaccess is placed in the 'Site/Shop/' ROOT, where the Shop Index.php file is located.
Good Luck ;)
Ernie
ipc.li/cart/

PS: Next time, tell us FIRST, what exact OC Version you use :-\
Thanks for replying again Ernie ;D ,

I am using OpenCart 1.5.6.4.

Honestly, I don't have a htaccess file (htaccess.txt).

Hosting told me it is not always necessary to have one? I have re-installed opencart several times in the past couple of days and it hasn't show in my route OR shop subfolder once... ?

New member

Posts

Joined
Sat Jun 20, 2015 10:10 am

Post by BuzyBee » Thu Jun 25, 2015 12:49 pm

I have even just re-downloaded several open carts - versions before OC2, and none are showing .htaccess.txt files?

By the looks of things, my .htaccess file isn't showing on my mac because it's a hidden file, that's why it hasn't been transferred when I uploaded opencart. Which is making me worried what other hidden files hasn't it transferred? Am I best of re-installing AGAIN? ??? ???

New member

Posts

Joined
Sat Jun 20, 2015 10:10 am

Post by deepvision » Thu Jun 25, 2015 3:03 pm

No need to re-install again. There are no hidden files in the OC distribution package. But it appears that on mac .htaccess files are hidden by default. It must be the only such file. You can also check php.ini and admin/php.ini files, but I don't think they are hidden on mac.

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by BuzyBee » Thu Jun 25, 2015 3:15 pm

deepvision wrote:No need to re-install again. There are no hidden files in the OC distribution package. But it appears that on mac .htaccess files are hidden by default. It must be the only such file. You can also check php.ini and admin/php.ini files, but I don't think they are hidden on mac.
I think the problem is that I uploaded all the files within the opencart "upload" folder, and not the "upload" folder itself. That resulted in me missing the .htaccess.txt file due to it being hidden in mac. If I would have uploaded the whole "upload" folder, it would have worked.

If that makes sense? Anyway I have just added the .htaccess.txt file from the original download, should all be ok now and no need to worry?

New member

Posts

Joined
Sat Jun 20, 2015 10:10 am

Post by deepvision » Thu Jun 25, 2015 3:31 pm

You should rename the file to .htaccess
And I don't think you need to worry as long as it is working.

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by IP_CAM » Fri Jun 26, 2015 9:27 am

I love those Mod's, created with a Mac, they all contain not only their own hidden Sub, but also hidden Files, in every Sub, and along every File. But since do NOT display them, Mac-Owners are usually not even aware of, that they exist. You should SET your Mac, so it display's hiden files as well, it's the only PROPER Way for a Webmaster, to have, and keep, control, over, what other place on his/her Server.

Or then, use a regular FTP-Client, to have/keep controll, over what you do.
I remove all this Garbage from every Mod, before uploading it to a Server!

Ernie
ipc.li/shop/

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

Post by cube10025 » Sun Mar 11, 2018 2:53 am

I also don´t have the .htaccess. file, I tried to upload the .htaccess. file but it wont show in cpanel, how are we supposed to use SEO!? Can´t rename it if I can´t find it, rename it in windows and upload did not work either...

Newbie

Posts

Joined
Mon Jun 05, 2017 8:19 pm

Post by cube10025 » Sun Mar 11, 2018 3:01 am

Solved it, need to check hidden files in cpanel.

Newbie

Posts

Joined
Mon Jun 05, 2017 8:19 pm

Post by IP_CAM » Sun Mar 11, 2018 5:03 am

Well, always make sure, to see your .hidden Files locally,
as well as on your Server, because as I mentioned above, those,
using MAC's add bunches of _hidden Subs and Files onto
your Server, beeing part of their Mods, even some Github-related Extensions
might contain such, if you upload their Extensions without looking at them first.
So, better don't believe a single word, if some will tell you, to install Extensions,
by uploading them as ZIP by the install routine, as they come by default... :crazy:
because you never know, what you will get. Especially in times, when download
Pages even from the OC Download Center contain Malware, to misuse your Server
and local PC, to generate Code and serve as 'helper' for virtual Currencies.
Good Luck! ;)
Ernie
...
Image

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

Post by skt » Thu Jul 05, 2018 9:34 pm

Dear All,
i have the answer. Go to CPANEL and open File Manager. Go to Settings(Top right corner in bigrock) and put tick on "Show hidden files" and save. Then our .htaccess.txt files will appear in out main folder(Public Html).
Then we can rename this file as .htaccess. Thank you

skt
Newbie

Posts

Joined
Wed Jul 22, 2015 1:37 am
Who is online

Users browsing this forum: No registered users and 112 guests