Laravel route()重定向到http:// localhostarticle

时间:2016-04-16 18:11:58

标签: laravel-5.2 laravel-routing

为什么Laravel route()会重定向到http://localhostarticle而不是http://localhost/article

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]

1 个答案:

答案 0 :(得分:0)

从apache vhost及其帮助中删除所有重定向