1
votes

I Use simple configuration in .htaccess file

RewriteEngine on   
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

It help me to remove .php from pages now i want to get all pages after index like this is my index page https://www.example.com/index if i point to about page it should move after index like this https://www.example.com/index/about also my about page is in same directory kindly Help !

Thanks

1
So https://www.example.com/index/about should be handled by https://www.example.com/index.php/about ?anubhava
yes i want something like thisuser3210175

1 Answers

0
votes

Try this rule:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^([^/]+)(/.*)?/?$ /$1.php$2 [L]