hello, can someone tell me if i can do this
i have a path as follows:
http://localhost/myfolder/banks.php?id=1
is it possible for me to configure either php or apache in such a way that i can access this same program as:
http://localhost/myfolder/banks?id=1
thanks, winnie
I've seen this question asked before and no one has been able to give a way to do it. I don't think you can...
---John Holmes...
http://localhost/myfolder/banks?id=1 isn't possible. but http://localhost/myfolder/banks/1 is possible.
read the article "build a search engine friendly website with PHP "
------how it works-------------- add this to your .htaccess file
<Files yourphpfilename> ForceType application/x-httpd-php </Files>
it works for me. take a look http://www.celebritieszones.com/showthumb/britney_spears/1/
Sure you can.
Look in httpd.conf for a line that says
DefaultType text/plain
Change it to
DefaultType application/x-httpd-php
Then restart apache.
I usually like to use Apache's mod_rewrite for these types of issues.
See http://www.engelschall.com/pw/apache/rewriteguide/ for instructions.
For example, you can change a URL like
into
http://localhost/myfolder/bank1.html
By adding the following to your .htaccess file (if you have mod_rewrite installed!):
RewriteEngine on RewriteRule bank([0-9]+).html banks.php?id=$1
Wow....very interesting. That can solve a lot of problems...
K, just make a folder entitled bank and upload bank.php as index.php into the folder. you can no access this by /bank?foo=1