SA-MP Forums Archive
A very quick question - PHP - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: A very quick question - PHP (/showthread.php?tid=349768)



A very quick question - PHP - Silentfood - 10.06.2012

Hi.

I hate making a thread for this, I'd prefer a thread for those quick questions with web development.
I can't put a name on it, because I don't know what it's called.
What is this called, and how do I do it in PHP?

https://www.example.net/forums/section/17/thread

What I mean is, how do I let my PHP handle "/thread" without using directories? So I could do

http://site.com/homepage
http://site.com/infopage

...without using separate files? Hence, one index.php file?

Thanks!


Re: A very quick question - PHP - Silentfood - 10.06.2012

I think I might have found out myself. After many many searches on something I don't know what's called, I used a mod_rewrite to navigate everything to index.php.

Solved.


Re: A very quick question - PHP - Aldo. - 10.06.2012

This is done by .htaccess not PHP


Re: A very quick question - PHP - kikito - 10.06.2012

You can still use $_GET variables to create more than 1 page on the same php file.
Then, you use mod_rewrite to make that pages looks like directory.