tags:

views:

138

answers:

3

I want to hide the URL of my PHP page; that is, I don't want to write /register.php directly in the href tag, I want to write /register/ and have it open the register.php page directly. I want to do that for all the webpages.

A: 

umm quick fix is to make a directory called register and save it as the index.php then make sure all your forms have action="/register/" (assuming register is a root folder of domain)

Carter Cole
It sounds like he has a number of pages; he just wants `/foo/` to redirect to `/foo.php` for any `foo`
Michael Mrozek
Hello,I have written code for this...<p class="text13"><a rel="nofollow" href="/register/">Register</a></p> This is not working...saying page not found. I have created a folder called register and inside the folder i have index.php file. Also tell me if I want to open another page inside the same folder how can i do without writting the extension.Thanks,Manoj
manoj singhal
Check the website http://phpclasses.byting.at/browse/ they are opening a page with the help of the folder name....
manoj singhal
if you want to use more than one script your going to want to use the .htaccess method described above
Carter Cole
+2  A: 

You should take a look at mod_rewrite; it's a Apache module that will help you with it.

Lord Otori
+2  A: 

In .htaccess try this :

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ $1.php [L,QSA]
Brice Favre