Ive often heard people of talking about spoofing their urls not to display the .php, but doesnt display anything at all.like: http://www.blah.com/blah/blah?id=12?typ=6?redirecter=0
How do they do it? Thanks for any kind of help anyone could offer, =)
spoof url?
You mean something like this => http://evilcity.hellous.com/index.evil
This can be accomplished using a .htaccess file
This is what I have in my .htaccess file in the root directory:
AddType application/x-httpd-php evil
DirectoryIndex index.evil index.php index.html
so that directs all .evil extentions to the php.exe excutable?
that, or if you're sending vars to an index.php page in a sub directory, you can use the short-handed:
http://www.mysite.com/subfolder/?id=23&blah=cool&etc=more
this would be treated the same as
http://www.mysite.com/subfolder/index.php?id=23&blah=cool&etc=more
yea!, thats what yahoo does! but to do that, you need to put all the scripts on one page(index.php) right?By the way is Ends Design your company?
Well, you don't have to put all the script in the index page, what most people do is to use the index page as a switch so it includes different files depending on the action.
Consider this:
$menu = $_GET['menu'];
switch ($menu) {
case 'menu1':
include 'header.php';
include 'myscript.php';
include 'footer.php';
break;
case 'menu2':
// do something else
break;
default:
// what else is there to do?
}
good idea, so in for you cases, are those cases going to be all on the index file? For example, when u put do something, did you want the index file to redirect to another page or excute whatever script was under the case?
Yes, the switch statement above will have to be in the index page.
Notice that the script does not redirect, but includes.
You can use apache url rewriting to do this.
the switch statment thing works wonders...used it many times...
and yes, Ends Design is my company