View Full Version : Ok, Dumb Question
Right ok if i have,
http://mysite.com/Chris
Chris being a users username
How can i make that redirect to
http://mysite.com/members.php?user=Chris&MemberId=&1
The folder automatically creates when a user registers, but i want it to redirect to the page..
Try for ages, can't figure it out..
Thanks
Flisker
10-03-2008, 06:09 PM
.htaccess with ModRewrite
CODE
RewriteEngine On // - you are starting rewrite mod :)
RewriteBase / // - you set the rewrite base
RewriteRule ^(.+)/?$ members.php?user=$1&MemberId=$2 // and rule:
// ^(.+) - text ONLY
// ([0-9]+) - numbers ONLY
.htaccess with ModRewrite
CODE
RewriteEngine On // - you are starting rewrite mod :)
RewriteBase / // - you set the rewrite base
RewriteRule ^(.+)/?$ members.php?user=$1&MemberId=$2 // and rule:
// ^(.+) - text ONLY
// ([0-9]+) - numbers ONLY
That makes absolutly no sense to me, ive never used htaccess before
Flisker
10-03-2008, 06:52 PM
RewriteEngine On // - you are starting rewrite mod
RewriteBase / // - you set the rewrite base
RewriteRule ^(.+)/?$ members.php?user=$1&MemberId=$2 // and rule:
// ^(.+) - text ONLY
// ([0-9]+) - numbers ONLY
add that to the file named .htaccess in /public_html/
Navicat
10-03-2008, 08:06 PM
You dont need to make folders, use mod_rewrite, else just put an index file in that folder.
I tried this
but customized it to
RewriteEngine On // - you are starting rewrite mod
RewriteBase / // - you set the rewrite base
RewriteRule ^members/(.+)/?$ members.php?MemberId=$1 // and rule:
// ^(.+) - text ONLY
// ([0-9]+) - numbers ONLY
and got
Internal Server Error
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.