Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

aliabdm's avatar

wamp vhost download index.php instead of opening it

I just switched from xampp to wamp and every thing is working well , but my vhosts are not working but downloading index.php , ive tried every solution out there and its not working , my phpinfo() at root is working , I removed htaccess or parts of it and tried a lot and nothing seems to work http.conf contains : AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 , local host and artisan serve work perfectly even WordPress sites vhost worked 100% , only with Laravel projects I got this issue , any solution ?

and this is my htaccess (that worked fine wth xampp):

Options -MultiViews -Indexes
RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-da
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
0 likes
8 replies
jlrdw's avatar

Are you correctly pointing to public as document root.

ziarv's avatar

Check if mod_rewrite is enabled in wamp

aliabdm's avatar

I figured out that Vhost is working on other laravel project but its not working only on a specific project even though the htaccess file is the same but still cant see the problem

aliabdm's avatar

Note: I cant use only artisan serve cause its a single thread and I wanna hit the local serve many time in one request

aliabdm's avatar

A side solution for such a problem to make local works multi threads on artisan serve is to run the project on 2 ports one is the default and the second one is the one you hit on a guzzle or something ,but still not the perfect solution

Please or to participate in this conversation.