产品服务AMH 免费服务器主机面板SSL证书 免费SSL证书申请 担保单 免费安全、零费率交易平台编程助手免费智能写代码、翻译AMYSQL 免费MySQL管理工具

AMH 社区首页

 AMH社区 - 开放自由有价值的社区

[求助帖] .htaccess转nginx伪静态的问题!!!

冬眠的龙龙
铜牌会员
646.00 价值分

冬眠的龙龙 发表于 2013-07-29 21:03:46
小白不会玩,试了这个帖子在线转换的http://amysql.com/bbs/forum.php?mod=viewthread&tid=221,可是还是打开还是404,安装的是boxbilling。
附上.htaccess
# Read documentation http://www.boxbilling.com/docs/ for more information
# Rename this file to .htaccess in order to work
# If you are receiving "Internal Server Error" message - make sure mod_rewrite is enabled in apache

Options -Indexes
Options +FollowSymLinks

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts`
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*([^)]*) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

### re-direct to www
#RewriteCond %{HTTP_HOST} ^yourdomain.com
#RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]

# If you are receiving "Internal Server Error" message
# Tune path if installing into subfolder, ie "RewriteBase /boxbilling/"
# RewriteBase /

# This line is for Windows Environment when API is giving authorization error
RewriteRule .? - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

<FilesMatch ".(htaccess|htpasswd|ini|log|sh|inc|bak|phtml|sql)$">
Order Allow,Deny
Deny from all
</FilesMatch>

<IfModule mod_headers.c>
# MONTH
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>

# WEEK
<FilesMatch ".(js|css|pdf|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>

# DAY
<FilesMatch ".(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
</IfModule>

求解答!!!:'(


2013-07-29 21:03:46 1

amysql
创始人
99530.81 价值分

参考官方
http://www.boxbilling.com/forum/ ... ite-rules-for-nginx


location / {
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?$1 last;
}
}

location ~ /bb-admin\.php {
if (!-e $request_filename) {
rewrite ^(.+)$ /bb-admin.php?$1 last;
}
}
  支持 (0分)  反对 (0分)
回复  2013-07-29 21:25:36 2

AMH面板 - 好用高效低占用、安全可靠极稳定

冬眠的龙龙
铜牌会员
646.00 价值分

引用:
amysql 发表于 2013-7-29 21:25
参考官方
http://www.boxbilling.com/forum/ ... ite-rules-for-nginx



嗯现在解决了,可是进后台出问题,问什么进后台是直接下载后台文件啊???
  支持 (0分)  反对 (0分)
回复  2013-07-29 21:37:24 3
 1  (总1页)
AMH社区列表
用户服务中心