I want every subdomain to act as a folder, so basicly:
projects.dev -> /
test.projects.dev -> /test
amazing-project.projects.dev -> /amazing-project
And I have this code in my Virtualhost file:
<VirtualHost *:80>
ServerName projects.dev
DocumentRoot "D:/xampp/htdocs/projects"
ServerAlias *.projects.dev
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)\.projects\.dev
RewriteRule ^/(.*)$ "D:/xampp/htdocs/projects/%1/$1" [L,R=301]
</VirtualHost>
However when i go to "designs.projects.dev" it gets redirected to "designs.projects.dev/index.php/index.php/index.php/index.php/" (the /index.php continues for a while).
Does anyone know why this happens?
Thanks.