0
为什么可以Laravel路线()重定向到http://localhostarticle代替http://localhost/articleLaravel路线()重定向到http:// localhostarticle
blog.conf
DocumentRoot /var/www/blog/public
ErrorLog ${APACHE_LOG_DIR}/blog/error.log
CustomLog ${APACHE_LOG_DIR}/blog/access.log combined
<Directory "/var/www/blog/public">
Options Indexes MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from All
</Directory>
的.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase/
# Redirect Trailing Slashes...
RewriteCond %{REQUEST_URI} !^
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Send requests to public directory...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule^index.php [L]
它看起来并不像您使用默认的'.htaccess' - https://github.com/laravel/laravel/blob/master/public/。 htaccess的。我不是'.htaccess'的专家,但你已经设置你的虚拟主机直接进入公共目录,但是你在'.htaccess'中使用规则向公共发送请求...尝试替换你的' .htaccess'与默认的一个,看看是否有帮助。 – James
你跑的是什么版本的Laravel,@aisthetes? – Mike
Laravel 5.2。多数民众赞成在没有帮助... – aisthetes