exp wwww.exsample.com/directory/index.php I want to display it as www.exsample.com/index.php
Below is the Htaccess script I'm using but it causes my site to break
Expand|Select|Wrap|Line Numbers
- Options +FollowSymLinks -MultiViews
- # Turn mod_rewrite on
- RewriteEngine On
- RewriteBase /
- RewriteCond %{REQUEST_FILENAME}.php -f
- RewriteCond %{REQUEST_URI} !/$
- RewriteRule (.*) $1\.php [L]
- RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+dirname/([^\s]+) [NC]
- RewriteRule ^ %1 [R=301,L]
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule (?!^dirname/)^(.*)$ /dirname/$1 [L,NC]
Any advice will be creat