user4006175
user4006175

Reputation: 399

wamp httpd virtual host embedded pdf and other files, not displaying only shows download

I was using laravel built in server and all the embedded files and pdf are displayed well

but when I try to test it on wamp server using virtual host the files that are embedded are no longer being displayed it only prompt to download the file, both in chrome and Mozilla

I think I miss-configured something in in httpd where I just add the code below to my httpd-vhost.conf, please help, thanks in advance

<Directory "C:/Users/xxx/Desktop/projects">
    AllowOverride All
    Order Allow,Deny
    Allow from all
</Directory>
<VirtualHost *:80>
    DocumentRoot "C:\Users\xxx\Desktop\projects\public_html"
    ServerName www.laravel-site.dev
</VirtualHost>

Upvotes: 1

Views: 450

Answers (1)

Pedro Fraz&#227;o
Pedro Fraz&#227;o

Reputation: 27

.htacess This will allow some files that exist to be displayed directly you can edit by changing the extensions on line 2.

RewriteCond ${REQUEST_URI} ^.+$
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf|xml)$ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^ - [L]

Upvotes: 1

Related Questions