z0r Forums

Full Version: A sudden coding question.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a question to site coder(s). How did you make every page to assign to it's number?

I have tried both ways to do something like that on my local site and I had this pictures on a quit:
1. Every page with it's flash (for example) file locates in it's own folder like 7324, but it was originally a failed structure after I saw I can enter any number in your site's address and there will be a z0r.de page anyway.
2. When writing this, I just thought I can create a page like 312.html in a root and use it in a navigation. But I ain't sure.

I also saw I can print xxxx or 12xxxxxx on your site and it works the same way.

As a noob in php coding I wonder how did you do that.
Can you give me an advice, please?

- respectfully. john.
I forward the number via htaccess to a php script.
For example http://z0r.de/4 forwards to http://z0r.de/index.php?id=4
The php script then displays the respective animation.
So you use a rewrite module for that?

RewriteEngine on
RewriteRule ^([0-9]+)$ index.php?id=$1
This will forward only numbers so subfolders that begin with letters still work
Huge thanks. Didn't think it is that easy.