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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-08-2005, 12:59 PM   #1
acctman
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

Last edited by acctman; 02-08-2005 at 01:01 PM..
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 01:06 PM   #2
rickholio
Confirmed User
 
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
Quote:
Originally Posted by acctman
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
So what are you trying to do here, exactly... push a user from profile.php?user=blah to /blah? If so, just use a

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?
rickholio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 01:17 PM   #3
acctman
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
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 01:22 PM   #4
pornRefinery
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.
pornRefinery is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 01:31 PM   #5
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
Quote:
Originally Posted by pornRefinery
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.

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

Last edited by acctman; 02-08-2005 at 01:33 PM..
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 01:43 PM   #6
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
Quote:
Originally Posted by pornRefinery
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.
hmm that didn't work
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 03:15 PM   #7
Jayo
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.
Jayo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 04:50 PM   #8
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
Quote:
Originally Posted by Jayo
try this:
Options +FollowSymLinks
RewriteEngine on
RewriteRule profile/(.*)/(.*)/$ /profile.php?$1=$2

RewriteEngine on
RewriteRule profile/(.*)/(.*)/?$ /profile.php?$1=$2
that sort of works, but images aren't loading
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 08:41 PM   #9
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
bump ....
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-08-2005, 10:09 PM   #10
wimpy
Confirmed User
 
Industry Role:
Join Date: Jan 2003
Location: Cali
Posts: 607
Quote:
Originally Posted by acctman
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
Just be sure to create your own user login for any dir that you use yourself.
__________________
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
wimpy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.