".php" file extension not to be shown in my web app???
RewriteEngine On # Unless directory, remove trailing slash RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/$ http://example.com/folder/$1 [R=301,L] # Redirect external .php requests to extensionless url RewriteCond %{THE_REQUEST} ^(.+)\.php([#?][^\ ]*)?\ HTTP/ RewriteRule ^(.+)\.php$ http://example.com/folder/$1 [R=301,L] # Resolve .php file for extensionless php urls RewriteRule ^([^/.]+)$ $1.php [L]
simplest trick is to create a folder, rename it to file name example "contact" if the file is contact.php and the move contact.php to contact folder and rename it to index.php
Обсуждают сегодня