A very quick question - PHP
#1

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!
Reply
#2

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.
Reply
#3

This is done by .htaccess not PHP
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)