Laravel 4 remove Index.php from URL

后端 未结 7 1302
忘掉有多难
忘掉有多难 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:07

    FOR LAMP SERVER

    Try the following steps,

    1. Activate the mod_rewrite module with,

    sudo a2enmod rewrite

    1. and restart the apache

    sudo service apache2 restart

    1. To use mod_rewrite from within .htaccess files (which is a very common use case), edit the default VirtualHost with

    sudo nano /etc/apache2/sites-available/000-default.conf

    1. Search for “DocumentRoot /var/www/html” and add the following lines directly below:

      ` 
              AllowOverride All
      
      
    2. Save and exit the nano editor via CTRL-X, “y” and ENTER.

    3. Restart the server again:

    sudo service apache2 restart

提交回复
热议问题