Laravel 4 remove Index.php from URL

后端 未结 7 1264
忘掉有多难
忘掉有多难 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)

    
        
            Options -MultiViews
        
    
        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]
    
    

提交回复
热议问题