Cloud9247 Posted May 21, 2006 Share Posted May 21, 2006 Well,I have had a membership system set up for about 2 months on my site, [a href=\"http://the-knighthood.net\" target=\"_blank\"]http://the-knighthood.net[/a], and I was wanting to set it up so each user can have their profile viewed at [a href=\"http://the-knighthood.net/~Username~\" target=\"_blank\"]http://the-knighthood.net/~Username~[/a], instead of [a href=\"http://the-knighthood.net/member.php?member=view&profile=4\" target=\"_blank\"]http://the-knighthood.net/member.php?membe...w&profile=4[/a] (too long x_X), but I have no idea how to do this, and I can't seem to get any help off of google, please help!Thank you, Cloud9247 Link to comment https://forums.phpfreaks.com/topic/10133-seperate-directories-for-files/ Share on other sites More sharing options...
.josh Posted May 21, 2006 Share Posted May 21, 2006 you have to setup a subdomain with the user's name. you can do that in cpanel. not sure you can do that through php or not though.edit: wait, i totally misread your question Link to comment https://forums.phpfreaks.com/topic/10133-seperate-directories-for-files/#findComment-37729 Share on other sites More sharing options...
Cloud9247 Posted May 21, 2006 Author Share Posted May 21, 2006 Can someone please help me then? Link to comment https://forums.phpfreaks.com/topic/10133-seperate-directories-for-files/#findComment-37748 Share on other sites More sharing options...
litebearer Posted May 21, 2006 Share Posted May 21, 2006 Sledgehammer approach...when user registers and submits profile, script creates a folder using the user's name AND creates an index.php file in that folder to display the profile.OR perhaps I too mis-read your question.Lite... Link to comment https://forums.phpfreaks.com/topic/10133-seperate-directories-for-files/#findComment-37786 Share on other sites More sharing options...
.josh Posted May 21, 2006 Share Posted May 21, 2006 okay so i lied a little bit. i kinda sorta know how to do it but not completely. well i know there is a way to do it by putting some stuff in .htaccess something like [code]+FollowSymlinksRewriteEngine onRewriteRule ^varname/(.*) http://www.blah.com/profile.php?varname=$1 [/code]and then when you do likewww.blah.com/CrayonViolentit takes you to profile.php?varname=CrayonViolent and you just get the info via regular means like $_GET or $_REQUESTi hope that points you in the right direction... Link to comment https://forums.phpfreaks.com/topic/10133-seperate-directories-for-files/#findComment-37793 Share on other sites More sharing options...
trq Posted May 22, 2006 Share Posted May 22, 2006 Assuming your using an Apache server. [a href=\"http://modrewrite.com\" target=\"_blank\"]mod_rewrite[/a] is what your looking for. Link to comment https://forums.phpfreaks.com/topic/10133-seperate-directories-for-files/#findComment-37829 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.