![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
Apache Mod_Rewrite help needed.
i'm trying to make the default user profiles url http://www.qwerty.com/profile.php?user=john appear as http://www.qwerty.com/john and also be able to use http://www.qwerty.com/john/ with the slash. i want this for all users
i've tried a few rewrites and ended up just blocking the site |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
Quote:
header("Location: http://www.qwerty.com/$_GET[user]") or similar in your php page. If you're trying to map /john (or /john/) to profile.php?user=john, that gets a little more interesting, because then ANY subdirectory would have to be considered a profile request. Is that what you're after? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
i want users to be able to type in http://www.qwerty.com/UserName/ or http://www.qwerty.com/UserName and pull up there account http://www.qwerty.com/profile.php?user=UserName
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2005
Location: ICQ 241-656-086
Posts: 384
|
RewriteEngine on
RewriteRule ^/p/([^/]+) /profile.php?user=$1 Will redirect domain.com/p/john to the page you want. It's better to do it under /p/ or any other name you choose as opposed to the root dir. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
Quote:
i see you point, cause if a user makes and account called images and the redirect is on the root i'll be fucked or atleast the redirect would get confused. but is there a way around that? cause http://www.domain.com/UserName is so much cleaner looking and easier for a user to remember and tell someone |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Jan 2005
Posts: 854
|
try this:
Options +FollowSymLinks RewriteEngine on RewriteRule profile/(.*)/(.*)/$ /profile.php?$1=$2 RewriteEngine on RewriteRule profile/(.*)/(.*)/?$ /profile.php?$1=$2
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, you may use a 624x80 instead of a 120x60. Let me repeat... A 120 x 60 button and no more that 3 lines of DEFAULT SIZE AND COLOR text. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
bump ....
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Industry Role:
Join Date: Jan 2003
Location: Cali
Posts: 607
|
Quote:
__________________
Fyodor Dostoyevsky wrote: "Every man has reminiscences which he would not tell to everyone but only his friends. He has other matters in his mind which he would not reveal even to his friends, but only to himself, and that in secret. But there are other things which a man is afraid to tell even to himself, and every decent man has a number of such things stored away in his mind." icq 8243657 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |