I have an installation of Laravel on Wampserver. The directory is as follows:
C:wampwwwlaravel
Now URLs are like this:
http://localhost/laravel/public/index.php/home/index
So I used the following htaccess code
Options +FollowSymLinks
Options -indexes
DirectoryIndex index.PHP
RewriteEngine on
RewriteCond $1 !^(index.PHP|images|robots.txt)
RewriteCond %{REQUEST_ FILENAME} !-f
RewriteCond %{REQUEST_ FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L, QSA]
To reduce the URL to
http://localhost/laravel/public/home/index
But the laravel framework insists that all application files reside in the public folder.
So I would like to know what I need to add to (or subtract from) the htaccess file so that the URL can look like
http://localhost/laravel/home/index
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…