zachwlewis Posted January 26, 2007 Share Posted January 26, 2007 I would like to have a subdomain act as a variable, but I'm not sure how to do it. Basically, I want to be able to type in a URL like:[code]http://username.mypage.com[/code]And the page gets parsed as:[code]http://www.mypage.com/index.php?user=username[/code]Is this possible? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted January 26, 2007 Share Posted January 26, 2007 .htaccess page possibally Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted January 26, 2007 Share Posted January 26, 2007 just an assumption. but i dont think so. it just doesn't seem likely as subdomains are usually setup via the control panel (cPanel) which makes me wonder why it wouldnt work. maybe someone can clear it up? Quote Link to comment Share on other sites More sharing options...
zachwlewis Posted January 26, 2007 Author Share Posted January 26, 2007 Are you saying there is no PHP solution? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 26, 2007 Share Posted January 26, 2007 For something like usernames, where there will always be new people signing up, it would be way too much work to do it manually. It's mod_rewrite in htaccess. Quote Link to comment Share on other sites More sharing options...
zachwlewis Posted January 27, 2007 Author Share Posted January 27, 2007 Well, I read some tutorials on the use of mod_rewrite and it told me that I could do a lot with dummy directories, but it didn't really explain how to use that for subdomains. Any ideas on implementation? Quote Link to comment Share on other sites More sharing options...
TEENFRONT Posted January 27, 2007 Share Posted January 27, 2007 I looked into this and could never get .htaccess to work on sub domiains, so i settled for mypage.com/username as an address to give to members. .htaccess did this way just fine Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.