You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pdd-order-api/.htaccess

114 lines
4.2 KiB
ApacheConf

10 months ago
<IfModule mod_mime.c>
AddType application/x-javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css application/json application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpeg A31536400
ExpiresByType image/png A31536400
ExpiresByType image/gif A31536400
ExpiresByType application/javascript A31536400
ExpiresByType application/x-javascript A31536400
ExpiresByType text/css A31536400
</IfModule>
<IfModule mod_php5.c>
php_value max_input_time 1800
php_value post_max_size 256M
php_value max_input_vars 30000000
php_value memory_limit 512M
</IfModule>
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename zc.htaccess to .htaccess.
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# SEO URL Settings
RewriteEngine On
# If your zc framework does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
## eg. handler 301 redirect
# RewriteCond %{http_host} ^zc-framwork.com [nc,or]
# RewriteCond %{http_host} ^zcframework.com [nc]
# RewriteRule ^(.*)$ http://www.zc-framework.com/$1 [L,R=301]
# RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
# RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^(.git|.svn|.idea|.buildpath|.project|.settings|.metadata|composer\.json|composer\.lock|composer\.phar) - [NC,F]
#重定向/api/的路由
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} .*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule api/([^?]*) $1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteCond %{REQUEST_URI} (^/api/) [NC]
RewriteRule api/([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteCond %{http_host} (^api\.|\.api\.) [NC]
RewriteRule ^([^?]*) index.php?_route_=$0 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteCond %{http_host} !(^api\.|\.api\.) [NC]
RewriteRule ^([^?]*) api/index.php?_route_=$0 [L,QSA]
# RewriteCond %{http_host} ^anc.chengji-inc.com [nc]
# RewriteRule ^(.*)$ http://anc.szchengji-inc.com/$1 [L,R=301]
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.
# 1. If your cart only allows you to add one item at a time, it 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 work to disable it:
# php_flag magic_quotes_gpc Off
# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M
# 4. set max post size. uncomment this line if you 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
# 6. set max time for input to be recieved. 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_input_time 200
# 7. disable open_basedir limitations
# php_admin_value open_basedir none