Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to delete index.php from url ? how to enable mod_rewrite in apache2?

user-image
Question added by عبدالرزاق رحمون , IT engineer , Ministry of Education
Date Posted: 2016/03/27
Marouan Saadaoui
by Marouan Saadaoui , Web developer , Servlinks Inc.

Put this in your root .htaccess file.(mod_rewrite must be enabled)

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?/$1 [L]

Rehan Farooq
by Rehan Farooq , WEB DEVELOPER/DIGITAL MARKETING EXPERT , Upwork

to remove index.php from the URL, you can simply add the following to your .htaccess file.

It will also turn on the Apache Mod Rewrite Module as well.

 

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>

nassreddine seydi
by nassreddine seydi , Web and Hybrid Mobile apps Developer , DealTeamQatar

Rename the server.php in the your Laravel root folder to index.php and copy the .htaccess file from /public directory to your Laravel root folder.

 

Adam Ahmed
by Adam Ahmed , IT & Web Developer , Freelance

Basm allah alrahman alrahim

 

Fast trick

 

add no to the file ( i.e noindex.php )

 

 

Sami Ullah
by Sami Ullah , Front End Developer , DX Compliance

Thanks for invitation but I don't have much experience with servers side technologies.

More Questions Like This