The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Rewrite Help
I need some help with mod_rewrite.
I have setup a subdomain that uses member.php subdomain.domain.com/member.php I want to set it up so subdomain.domain.com/Username/ Will go to; subdomain.domain.com/member.php?username=Username However they will never know the member.php path. It just stays at subdomain.domain.com/Username/ I can do this using; RewriteCond %{REQUEST_URI} ^(.*)/ RewriteRule ^([^/]*)/$ member.php?username=$1 However this presents some issues. If you hit subdomain.domain.com/Username it errors out. I've tried some code to add the trailing slash but it gets confused when a user name has a . in it. Any help would be appreciated. |
#2
|
|||
|
|||
dude omg
if you can make it so lets say: MyExampleForum.com/member.php?username=Username if you can make it so i can get there by going to lets say: MyOtherDomain.com/username if you can make it so i can do that i would be willing to pay for that |
#3
|
||||
|
||||
Note: none of this is tested
Try this. Don't bother with a rewrite condition. RewriteRule ^/([^/]+)/$ member.php?username=$1 This following example may not work because I don't know if mod_rewrite supports look ahead assertions, but it is a bit more robust (it doesnt try to convert php urls) RewriteCond %{REQUEST_URI} ^/([^./]+)/$|^/([^/]+\.(?!php($|\?))(.*))/$ [NC] RewriteRule ^/([^/]+)/$ member.php?username=$1 Quote:
RewriteRule ^/(.*) http://MyExampleForum.com/member.php?username=$1 [L,R] |
#4
|
|||
|
|||
ya none of them worked but i did find a way to do it
but thanks anyways |
#5
|
||||
|
||||
Where are you putting the rules?
|
#6
|
|||
|
|||
if your talking to me then
here this will help you out i posted how to do it since it was not posted anywhere else here on the site and ya here is the link https://vborg.vbsupport.ru/showthrea...31#post1441331 |
#7
|
||||
|
||||
I thought you said it DIDN'T work. I thought you weren't putting them in htaccess and in somewhere else (eg. in a plugin).
|
#8
|
|||
|
|||
no the ones he posted didnt work i did a lil research and got one to work
the one that i got to work for IE and FF i posted the tutorial and all that |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|