我有Apache2 Ubuntu 16.04的小问题,安装完php后,mysql Ant 其他的东西,我不能通过漂亮的URL去子页面 .

所有页面都在子文件夹/ var / www / html /中:

  • sub1

  • sub2

  • sub3

URL:192.168.1.23/sub1 - 工作网址:192.168.1.23/sub1/public/index.html - 工作网址:192.168.1.23/sub/c/product-name-123 - 不工作,404错误:在此服务器上找不到请求的URL /index.php .

我在000-default.conf,apache2.conf中进行了很多更改但是它们不起作用

我的.htaccess

RewriteEngine On

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L]

php_flag log_errors on
php_value error_log ./logs/error.log