Hide Current Page URL in Address Bar


I would like to add what I call a small security feature to my website. I currently have similar URL’s to most sites on the net - i.e. http://www.mywebsite.com/index.php


I want to hide the “index.php” and “about.php” part or the above URL’s
so that the URL’s become:

This would mean that anyone using the site doesn’t even know the name of the file on the server that they are looking at in their browser.

I know I could this with frames but I definitely don’t want to use frames … 'cos they bad bad bad!

Anyways … any help is appreciated.

You can use .htaccess to call any page.php so it will show up as “page” and they will think it’s a folder. You can also have .htaccess force index.php to open without using index.php. Just yoursite.com/ will open up.
I have the code here:

 DirectoryIndex index.html filename.html index.cgi index.pl default.htm index.php index.shtml index.htm filename.php

You don’t have to include filename.php or filename.htm, html or anything like that. I use it so mysite.com/mypage.php will open with mysite.com/mypage/ and so on.

Also research ‘mod_rewrite’

try this with .htaccess upload on your site root

RewriteEngine On
#Below if you want contact.php the URL will be
RewriteRule ^page/1/$ contact.php
#And if you want about.php the URL will be
RewriteRule ^page/2/$ about.php

Hope this will help you