我有一个网站设置和运行良好的银条纹cms。我创建了一个php脚本(不是插件),可以进行一些文件转换。我将脚本上传到了站点根目录,并在其中创建了一个.htaccess文件,并使用“全部允许”来创建.htaccess,并且我授予777文件夹权限,以允许从浏览器访问此脚本。但是,该网站的“未找到网页”页面却显示出来了。允许脚本在cms内执行
有人可以解释我在这里错过了什么吗? 这是htaccess文件的一些条件语句:
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
这里是当前htaccess文件:
Options +FollowSymlinks
### SILVERSTRIPE START ###
<IfModule mod_dir.c> DirectorySlash Off </IfModule>
RewriteEngine On RewriteBase/RewriteRule ^index.html$ http://www.domain.com/ [R=301,L] RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_URI} !^/csv_compare
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END ###
您可以发布您的CMS放入htaccess的任何规则吗? –
刚刚更新了一些规则的帖子,谢谢 – kumo99
当你评论规则,你仍然会得到一个404错误?你确定php文件是可访问的吗? (它不需要是777,只需644) –