URL Rewriting doesn't seem to work. Apache2

允我心安 提交于 2019-12-05 05:51:01
Alexandre Hitchcox

Ok well I fixed the problem, this is how I did it.

sudo gedit /etc/apache2/sites-available/default

and then I modified AllowOverride None to AllowOverride all in the /var/www/ part of the file

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all #This was 'None' before, change it to 'all'
    Order allow,deny
    allow from all
</Directory>

This worked for me after removing the forward slash:

RewriteEngine On 
RewriteBase /test 
RewriteRule ^(.+)$ page.php?id=$1 [NC,L]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!