How to Enable Ftp Upload Opencart 3
This article will bear witness yous everything you demand to know about how to configure your .htaccess file in Opencart. The .htaccess file plays a couple important roles.
Important Roles of .HTACCESS (as pertains to Opencart)
-Adds extra security to the framework with sure command lines. Here is an example of such lines:
# Prevent Directoy listing
Options -Indexes
# Preclude Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>
-Enables Apache Modernistic Re-write to work correctly. Here is an example of that command line:
# SEO URL Settings
RewriteEngine On
# If your opencart installation does non run on the main spider web folder make sure you binder it does run in ie. / becomes /store/
RewriteBase /
RewriteRule ^sitemap.xml$ alphabetize.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [50]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
There are also extra functions that the Opencart .htaccess file has. Here are all of the actress lines to pay attending to:
### Boosted Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of information technology.
### If y'all get an "Internal Server Mistake 500" after enabling whatsoever of the following settings, restore the # every bit this means your host doesn't let that.
# 1. If your cart simply allows you to add one item at a time, information technology is possible register_globals is on. This may work to disable it:
# php_flag register_globals off
# 2. If your cart has magic quotes enabled, This may piece of work to disable it:
# php_flag magic_quotes_gpc Off
# iii. Set max upload file size. About hosts will limit this and not allow it to be overridden but yous tin can try
# php_value upload_max_filesize 999M
# 4. set max post size. uncomment this line if yous have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M
# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200
# vi. set max time for input to exist received. Uncomment this line if yous have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200
If a line has a # sign earlier it then information technology is non active. It'due south basically COMMENTED OUT. These are optional settings that you tin enable if yous need to. What nosotros are really going to focus on today is the setting that pertains to the SEO URL or otherwise called APACHE MOD RE-WRITE. Opencart uses APACHE MOD RE_WRITE along with PHP to allow for all urls to become friendlier to Search Engines. This happens by turning a dynamic URL into a STATIC URL. When setting up your catalog you will observe a place to enter what is called an SEO KEY Word. This keyword will place the detail in the URL for example www.yourdomain.com/itemize/cakes/chocolate-block chocolate cake being the Cardinal Word. You can gear up this upward for all of your products, category names, and certain other pages just it will non work unless you starting time enable the .htaccess.
Enabling the .htaccess
The .htaccess in Opencart, by default comes as a text file so it volition look like .htaccess.txt In order to enable the file we need to go rid of the (.txt) at the finish and rename it. The easiest way to do this is to upload it to your server and rename the file from within your FTP. For example in File Zilla you just have to right click on the file and choose RENAME.
Now you demand to make sure that the rewrite command is configured correctly. If you installed your Opencart in the root directory (which means it is not in a sub binder) and then you will not need to practice anything. If y'all installed in a sub directory then go to the following line and make sure it points for your sub-directory
RewriteBase / << If your sub directory is "cake" the this should read /block
This is the basic apply of the .htaccess however there are many uses that yous will find afterward on down the road. .htaccess is powerful and can also be helpful in other types of re-writes like 301.
Looking for quality OpenCart Hosting? Look no further than Arvixe Web Hosting!
Source: https://blog.arvixe.com/opencart-htaccess/
0 Response to "How to Enable Ftp Upload Opencart 3"
Post a Comment