how do some scripts that really use index.php?Midi=D end up being D.php. how can I do that without the file actually existing?
on a site note. how come "Notify me when a reply is posted" isnt working.
index.php?Midi=D into D.php ?
Moderator: General Moderators
-
psychotomus
- Forum Contributor
- Posts: 487
- Joined: Fri Jul 11, 2003 1:59 am
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
the scripts that would end up doing the midi=D that end up being D.php are using $_GET to use a header to the new page like
and on your other note you sure you supplied the correct email address?
Code: Select all
$go = $_GET['midi'];
header("Location: ".$go.".php");-
psychotomus
- Forum Contributor
- Posts: 487
- Joined: Fri Jul 11, 2003 1:59 am
shiznatix, think you got the wrong idea. the D.php doesnt exist but it like acts like it does.
like those phpBB mods that change all your pages into html files but those html files really dont exist. im talking about something like that.
and Syranide, Get the hell off my case. If you dont have nothing nice to say then dont but in my help threads. If I knew WTF this was called. I woulda done searched so therefor i asked for help.
like those phpBB mods that change all your pages into html files but those html files really dont exist. im talking about something like that.
and Syranide, Get the hell off my case. If you dont have nothing nice to say then dont but in my help threads. If I knew WTF this was called. I woulda done searched so therefor i asked for help.
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
simmer down there no need to get angry.
so are you saying that d.php ends up existing even though it didn't in the first place? im sure its hard for you to word the siuation but how do you know that d.php ends up existing? this probebly isn't what you are asking but this is what first comes to mind.
or maybe it creates a file on the fly then redirects you to it based on what midi equals.
so are you saying that d.php ends up existing even though it didn't in the first place? im sure its hard for you to word the siuation but how do you know that d.php ends up existing? this probebly isn't what you are asking but this is what first comes to mind.
Code: Select all
$go = $_GET['midi'];
if ($go == 'd')
{
//display certain code here
}
else if ($go == 'e')
{
//display some other code here
}Using Apaches mod_rewrite, you can achieve this;
http//www.example.com/section/news/ => http//www.example.com/index.php?section=news
http//www.example.com/news/2005/january/1/ => http//www.example.com/news.php?y=2005&m=january&d=1
http://httpd.apache.org/docs/mod/mod_rewrite.html
http//www.example.com/section/news/ => http//www.example.com/index.php?section=news
http//www.example.com/news/2005/january/1/ => http//www.example.com/news.php?y=2005&m=january&d=1
http://httpd.apache.org/docs/mod/mod_rewrite.html