Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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

user-image
Question ajoutée par عبدالرزاق رحمون , IT engineer , Ministry of Education
Date de publication: 2016/03/27
Marouan Saadaoui
par 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
par 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
par 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
par Adam Ahmed , IT & Web Developer , Freelance

Basm allah alrahman alrahim

 

Fast trick

 

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

 

 

Sami Ullah
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?