Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.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
Php .htaccess在raspberry pi 4型号B中不工作_Php_Apache_.htaccess - Fatal编程技术网

Php .htaccess在raspberry pi 4型号B中不工作

Php .htaccess在raspberry pi 4型号B中不工作,php,apache,.htaccess,Php,Apache,.htaccess,我最近使用了raspberry pi,而不是与xampp一起使用的windows 10计算机,我的.htaccess文件与相同的apache、mysql和php不兼容。此外,我还包括“重写”模块和: <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> 有什么想法吗?为什么这个

我最近使用了raspberry pi,而不是与xampp一起使用的windows 10计算机,我的.htaccess文件与相同的apache、mysql和php不兼容。此外,我还包括“重写”模块和:

<Directory /var/www/>   
    Options Indexes FollowSymLinks  
    AllowOverride All   
    Require all granted 
</Directory>

有什么想法吗?

为什么这个标签是
php
/Index.php
没有多大意义,它可能应该是
Index.php
.1。是htaccess文件/var/www/.htaccess的位置吗?2.带有Index.php的行是否应该在Index.php上有大写字母I?3.什么“不起作用”——它只是不删除index.php吗?4.尝试用以下内容替换您的最后一行:
RewriteRule^(.*)$index.php?$1
–注意括号,$1和无大写字母我非常感谢arkascha和Andy Mardell,问题在于大写字母。我更改了.htaccess中的文件名和引用,它成功了。
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^.*$ ./Index.php