i want to remove/hide the subdirectory "sites" from the url
/profile
/sites
login.php
register.php
index.php
.htaccess
this: http://localhost/profile/sites/login
to this http://localhost/profile/login
currently i am using this to hide the .php extension
htaccess:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php[\s?] [NC]
RewriteRule ^ %1 [R=301,L]
# To internally forward /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/profile/$1.php -f
RewriteRule ^(.+?)/?$ /profile/$1.php [L]