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.
views:
138answers:
3
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
2010-06-09 15:31:39
It sounds like he has a number of pages; he just wants `/foo/` to redirect to `/foo.php` for any `foo`
Michael Mrozek
2010-06-09 15:35:09
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
2010-06-09 15:36:46
Check the website http://phpclasses.byting.at/browse/ they are opening a page with the help of the folder name....
manoj singhal
2010-06-09 15:38:07
if you want to use more than one script your going to want to use the .htaccess method described above
Carter Cole
2010-06-09 17:48:10
+2
A:
You should take a look at mod_rewrite; it's a Apache module that will help you with it.
Lord Otori
2010-06-09 15:34:38
+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
2010-06-09 15:37:35