Laravel 4 remove Index.php from URL

后端 未结 7 1263
忘掉有多难
忘掉有多难 2020-12-21 04:27

I need some help with laravel 4 application i need to remove Index.php from url i have tried the solution that has been mentioned in laravel documentation

P         


        
相关标签:
7条回答
  • 2020-12-21 05:25

    uncomment 'LoadModule rewrite_module modules/mod_rewrite.so' in apache httpd.conf in 'public' folder check .htaccess file (created by default)

    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options -MultiViews
        </IfModule>
    
        RewriteEngine On
    
        # Redirect Trailing Slashes...
        RewriteRule ^(.*)/$ /$1 [L,R=301]
    
        # Handle Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
    </IfModule>
    
    0 讨论(0)
提交回复
热议问题