Showing posts with label htaccess remove php extension. Show all posts
Showing posts with label htaccess remove php extension. Show all posts
How to Remove Index.php from your URL?
20:20
In order to provide user friendly URLs you have to
remove index.php in your existing URL structure.
*The issue of
having index.php in your URL: URL
containing index.php will not refer to Your actual files or folders in the
server’s file system when user requested, and its not a user friendly URL.
Recommendation:
To
remove the index.php from Your existing URL structure, you have to create an .htaccess file at the root of your
site. After creation of .htaccess
file you add mod_rewrite in order to hide index.php in our URLs.
You should add following code inside your created .htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1
[L]
Finally you need to create .htaccess file in your root and add mod_rewrite inorder to remove index.php in your existing URL’s structure. Then your URL’s will looks like clean and smooth in terms of user prespective.
Finally you need to create .htaccess file in your root and add mod_rewrite inorder to remove index.php in your existing URL’s structure. Then your URL’s will looks like clean and smooth in terms of user prespective.