.htaccess rewrite not working?
2
votes
1
answer
1188
views
I have the following virtual host in /etc/apache2/vhosts.d/ip-based_vhosts.conf:
ServerAdmin webmaster@test.local
ServerName test.local
DocumentRoot /home/web/test.net/html
ErrorLog /var/log/apache2/test-error.log
CustomLog /var/log/apache2/test-access.log combined
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Order allow,deny
Allow from all
DirectoryIndex index.php
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/home/web/test.net/html/$1
And in /home/web/test.net/html I have:
**.htacess**
RewriteEngine on
RewriteRule ^(.*)$ index.php [QSA,L]
**index.php**
When I visit http://test.local I get correctly "/" (without quotes).
But when I visit anything else, e.g. http://test.local/abc I get a 404 page instead of "/abc".
How can I solve this to work properly?
Asked by george
(123 rep)
Jan 6, 2017, 12:04 AM
Last activity: Jan 6, 2017, 11:47 AM
Last activity: Jan 6, 2017, 11:47 AM