Jump to content


Photo

Seperate Directories for Files?


  • Please log in to reply
5 replies to this topic

#1 Cloud9247

Cloud9247
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationMy Computer

Posted 21 May 2006 - 05:17 PM

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

#2 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 21 May 2006 - 05:34 PM

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
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#3 Cloud9247

Cloud9247
  • Members
  • PipPip
  • Member
  • 20 posts
  • LocationMy Computer

Posted 21 May 2006 - 06:14 PM

Can someone please help me then?

#4 litebearer

litebearer
  • Members
  • PipPipPip
  • Advanced Member
  • 2,357 posts
  • Locationwhite lake michigan

Posted 21 May 2006 - 08:55 PM

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...

all the brothers were valiant!

[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture

#5 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 21 May 2006 - 10:07 PM

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

+FollowSymlinks
RewriteEngine on
RewriteRule ^varname/(.*) http://www.blah.com/profile.php?varname=$1 

and then when you do like

www.blah.com/CrayonViolent

it takes you to

profile.php?varname=CrayonViolent

and you just get the info via regular means like $_GET or $_REQUEST

i hope that points you in the right direction...
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#6 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 22 May 2006 - 12:19 AM

Assuming your using an Apache server. [a href=\"http://modrewrite.com\" target=\"_blank\"]mod_rewrite[/a] is what your looking for.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users