I’ve been looking for about a week for the answer, but I can not, for the sake of me, even get a straight answer, mainly because I don’t know the exact question, so I thought I’d post an example of the question.
How do I add a directory to the end of a PHP file? Or if it’s not a directory, what is it called, and how do I do it?
example: example.com/index.php?directory/some/more/things/
Note the ‘index.php?directory/’ that’s the part I refer to
Thanks in advance
– Pat
P.S. Links to documentation/tutorials would be greatly appreciated!
EDIT: This is one of the links i am talking about, it’s on a forum that I control, it is using Xenforo:
http://forum.noxcrew.com/index.php?forums/news-and-information.21/
If I understand correctly, what you’re looking for is a URL rewriting capabilities in the web server. These allow the user to pass one URL and the server internally process it as another URL. For example, the user may type into the browser:
And internally the server will invoke your program as
The configuration would be web server-dependent. For example, in apache you would use mod_rewrite, for example, like so:
This is, of course, a very simple example. You can do a lot more than this. Have a look at Apache mod_rewrite documentation for specifics. Of course, if you’re using a different web server (e.g. IIS), then you’ll have to look at that server’s documentation.