Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache rewriterule与serendipity日志不兼容_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Apache rewriterule与serendipity日志不兼容

Apache rewriterule与serendipity日志不兼容,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我正在使用serendipity日志,希望在apache htaccess文件中制定一个重写规则,当在浏览器中打开/info时,它会打开/index.php?/categories/1-info 我尝试了以下规则: RewriteRule ^info index.php?/categories/2-Info [L] 而且它不起作用。当我把替代物换成其他东西(比如)时,它确实会出现,所以模式应该是有效的,但它没有显示我想要看到的意外发现类别。但是,当我手动输入地址时,它确实起作用 我读了十几个有

我正在使用serendipity日志,希望在apache htaccess文件中制定一个重写规则,当在浏览器中打开/info时,它会打开/index.php?/categories/1-info

我尝试了以下规则:

RewriteRule ^info index.php?/categories/2-Info [L]
而且它不起作用。当我把替代物换成其他东西(比如)时,它确实会出现,所以模式应该是有效的,但它没有显示我想要看到的意外发现类别。但是,当我手动输入地址时,它确实起作用

我读了十几个有指南的网页,并使用了“http://martinmelin.se/rewrite-rule-tester/“来验证我的重写规则,但我仍然无法让它工作。不幸的是,我也无法查看或设置任何日志记录

我必须如何更改重写规则

编辑:

我的.htaccess文件如下所示:

# BEGIN s9y
ErrorDocument 404 /data/script/index.php
DirectoryIndex /data/script/index.php
Options -MultiViews

RewriteEngine On
RewriteBase /data/script/
RewriteRule ^info index.php?/categories/2-Info [L]

<Files *.tpl.php>
    deny from all
</Files>

<Files *.tpl>
    deny from all
</Files>

<Files *.sql>
    deny from all
</Files>

<Files *.inc.php>
    deny from all
</Files>

<Files *.db>
    deny from all
</Files>

# END s9y
#开始s9y
ErrorDocument 404/data/script/index.php
DirectoryIndex/data/script/index.php
选项-多视图
重新启动发动机
重写数据库/数据/脚本/
重写规则^info index.php?/categories/2-info[L]
全盘否定
全盘否定
全盘否定
全盘否定
全盘否定
#结束s9y

尝试通过添加
R
标志强制外部重定向:

RewriteRule ^info index.php?/categories/2-Info [L,R]

尝试通过添加
R
标志强制外部重定向:

RewriteRule ^info index.php?/categories/2-Info [L,R]

你的htaccess文件在哪里?还有其他规则吗?我添加了htaccess文件。其中没有其他规则。您的htaccess文件在哪里?还有其他规则吗?我添加了htaccess文件。这里面没有其他规则。