Php .htaccess在raspberry pi 4型号B中不工作
我最近使用了raspberry pi,而不是与xampp一起使用的windows 10计算机,我的.htaccess文件与相同的apache、mysql和php不兼容。此外,我还包括“重写”模块和: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> 有什么想法吗?为什么这个
<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