Remove /index.php


/ Published in: Apache
Save to your folder(s)

Removing index.php to url.
e.g. www.yourwebsite.com/index.php -> www.yourwebsite.com/


Copy this code and paste it in your HTML
  1. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
  2. RewriteRule ^(([^/]+/)*)index\.php$ http://%{HTTP_HOST}/ [R=301,NS,L]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.