无法重写URL CentOS 6.9

时间:2017-04-30 15:37:15

标签: php apache .htaccess mod-rewrite

我刚换了服务器。较旧的服务器运行CentOS 5和我新的Running CentOS 6.9。

我没有在.htaccess文件中更改任何重写规则,这是规则:

@Bean
public ViewResolver viewResolver() {
    InternalResourceViewResolver resolver 
            = new InternalResourceViewResolver();
    resolver.setViewClass(JstlView.class);
    resolver.setPrefix("/WEB-INF/jsp/");
    resolver.setSuffix(".jsp");
    return resolver;
}

检查我的httpd.conf文件时

  

AllowOverride All

当我运行此命令时apachectl -M |排序,这是赞美的模块

<IfModule mod_rewrite.c>
Options FollowSymLinks
RewriteEngine on
#RewriteBase /

##security
RewriteRule ^logo/(.*)\.(php|php3|pl|cgi)$ / [L]
RewriteRule ^other/(.*)\.(php|php3|pl|cgi)$ / [L]
RewriteRule ^logs/(.*)\.(php|php3|pl|cgi)$ / [L]
##end security
##test rewrite##
RewriteRule ^(.*)?/testrewrite(/)?$ $1/testrewrite.php?mod_r=1 [L]
##end test rewrite##

RewriteRule ^login/(.*)(/)$ login.php?login=$1 [L]
RewriteRule ^support/(.*)(/)$ support.php?type=$1 [L]
RewriteRule ^(.*)/?auth_sess=(.*)$ $1.php?auth_sess=$2 [L]
RewriteRule ^index/(.*)$ $1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/(.*)\.php(/)?$ $2.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/].*)/$ $1.php [L]

</IfModule>

有谁知道可能有什么不对吗?

0 个答案:

没有答案