laravel 下默认的.htaccess

刚下载的laravel设置完路由不能访问到,需要.htaccess文件
apache


    
        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]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

nginx

try_files $uri $uri/ /index.php?$query_string;

你可能感兴趣的:(laravel 下默认的.htaccess)