ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل عبدالرزاق رحمون , IT engineer , Ministry of Education
تاريخ النشر: 2016/03/27
Marouan Saadaoui
من قبل 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
من قبل 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
من قبل 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
من قبل Adam Ahmed , IT & Web Developer , Freelance

Basm allah alrahman alrahim

 

Fast trick

 

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

 

 

Sami Ullah
من قبل Sami Ullah , Front End Developer , DX Compliance

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

المزيد من الأسئلة المماثلة