ThI've tried some configurations with my .htaccess
file but I really can't find out what is going wrong.
I am new to the .htacces file and i just want 1 simple rewrite.
How do I rewrite this:
- my pages are in my
~/Pages
folder - I don't want to show:
http://host.com/Pages/page.php
- I want to rewrite this to:
http://host.com/page
- and that for example
~/Pages/Folder/page.php
becomes:http://host.com/Folder/page
Also I want it possible that people can navigate without having to think about capital letters in the URL bar.
Thanks in advance.
EDIT:
ok i have the extension removed. now i'm trying to point to ~/Pages/index.php
When someone visits the url http://HOST.com/index
This is what i got so far:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /urenreg/
## 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_URI} !urenreg/Pages/
RewriteCond ^(.+?)?$ Pages/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^(.+?)?$ /$1.php [L]
problem: it keeps pointing to /urenreg/pages and doesn't enter the file name in the link (suspecting)