我已经为我的网站上传了从5.3到5.5的PHP版本,但它重定向到即将到来的页面,我设置为401,403,500。
适用于旧的PHP版本(5.3)
http://www.techmodi.com/demo/jaspee/services/getCMS?id=1
但它不适用于升级版本,即5.5
http://apis.jaspee.com/services/getCMS?id=1
我也尝试使用AddHandler application / x-httpd-php55 .php,但是id下载文件而不是执行。
你能为这个解决方案提出建议吗?
Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine on
# Remove below Hash comment when your porject is going live (This is for PHP 5 support)
#AddHandler application/x-httpd-php5 .php
Options -Indexes
#Base navigational rules
DirectoryIndex index.php
RewriteRule ^index.php|index.html|default.php|default.html$ index.php [QSA,L]
#RewriteRule ^index.php$ controller/home/home.php [QSA,L]
#Admin interface URL
RewriteRule ^admin/{0,1}$ admin/index.php [QSA,L]
#User interface URLs
RewriteRule ^aboutus[/]{0,1}$ controller/cms/cms.php?id1=1
RewriteRule ^([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/{0,1}$ panel.php?id1=$2
# Folder name($1) / File name($1) (Use this when your folder name and file name is same)
RewriteRule ^([a-zA-Z0-9_=-]+)/{0,1}$ controller/$1/$1.php
#Folder name($1) / File name($2)
RewriteRule ^([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/{0,1}$ controller/$1/$2.php
#Folder name($1) / First Parameter($2) / File name($3)
RewriteRule ^([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/{0,1}$ controller/$1/$3.php?id1=$2
#Folder name($1) / First Parameter($2) / Second Parameter($3) / File name($4)
RewriteRule ^([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/{0,1}$ controller/$1/$4.php?id1=$2&id2=$3
#Folder name($1) / First Parameter($2) / Second Parameter($3) / Third Parameter($4) / File name($5)
RewriteRule ^([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/{0,1}$ controller/$1/$5.php?id1=$2&id2=$3&id3=$4
#Folder name($1) / First Parameter($2) / Second Parameter($3) / Third Parameter($4) / Fourth Parameter($5) / File name($6)
RewriteRule ^([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+)/{0,1}$ controller/$1/$6.php?id1=$2&id2=$3&id3=$4&id4=$5
#Folder name($1) / File name($2)
RewriteRule ^([a-zA-Z0-9_=-]+)/([a-zA-Z0-9_=-]+).html controller/$1/$2.php
# Module htaccess end
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .+ - [L]
# Page not found
ErrorDocument 400 http://apis.jaspee.com/comingsoon.php
ErrorDocument 401 http://apis.jaspee.com/comingsoon.php
ErrorDocument 403 http://apis.jaspee.com/comingsoon.php
ErrorDocument 404 http://apis.jaspee.com/404.php
ErrorDocument 500 http://apis.jaspee.com/comingsoon.php
</IfModule>
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_include mime ^images/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
# Check String ([A-Za-z]+)
# Check Number ([0-9]+)
# MIX ([a-zA-Z0-9_-]+)
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteBase /jspee
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ srvcRest.php?rqst=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ srvcRest.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^(.*)$ srvcRest.php [QSA,NC,L]
</IfModule>
<Limit GET POST PUT DELETE>
Allow from all
</Limit>