Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: mod_rewrite on get vairables?

(74 views • 2 replies)

This topic is 1 page long.

<< < > >>
None

akasquid

Reply To Post Reply & Quote

Posted at: 5/11/08 03:29 PM

akasquid NEUTRAL LEVEL 02

Sign-Up: 05/07/08

Posts: 261

Hey
You know how sites like Newgrounds work, with http://USERNAME.newgrounds.com or http://VARIABLE.site.com and then it takes that word, how's it done?

Presumably it's done with $_GET['variable']; but how would i tell the script that the GET is that string?

Is it with mod_rewrite? A link would be helpful, or even a code snippet explaining, ty. :)

User goes to http://LOLHI.website.com then page then echo's "LOLHI", because LOLHI is the $variable.


None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 5/12/08 12:42 PM

GuyWithHisComp LIGHT LEVEL 22

Sign-Up: 11/10/05

Posts: 4,033

Googling the most obvious string, "php subdomain as variable", I got many results. One of those pages should help you.

BBS Signature

None

akasquid

Reply To Post Reply & Quote

Posted at: 5/12/08 12:52 PM

akasquid NEUTRAL LEVEL 02

Sign-Up: 05/07/08

Posts: 261

Forgot about this topic //2

I solved it, had to update my server config to allow for wildcard domains etc.


All times are Eastern Daylight Time (GMT -4) | Current Time: 03:45 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!