I have a website in the d:\www\mysite on my local computer. I installed WAMPServer and set up the mysite alias mysite for my site.
So, for example, http://localhost/mysite/static-resource.html correctly extracts my file, which is located in d:\www\mysite\static-resource.html .
My problem is rewriting the urls in my .htaccess file:
RewriteEngine On RewriteRule ^articles/(\d+) ./article.php?id=$1
When I try to access http://localhost/mysite/articles/1 , I get this answer:
Not found
The requested URL / www / mysite / article.php was not found on this server.
I can confirm that the article.php file article.php in d:\www\mysite\article.php .
In the past, I had the root of my site ( d:\www\mysite ) configured as the Apache server DocumentRoot (instead of c:\wamp\www , which is the default), in which case my redrawing URL worked , so my current The problem should be related to the fact that my site is located behind the alias directory.
The contents of my mysite.conf file:
Alias /mysite/ "d:/www/mysite/" <Directory "d:/www/mysite/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny Allow from all </Directory>
source share