Log in

View Full Version : shorten user profile url


fxdigi-cash
09-22-2013, 02:20 PM
I'm having hard time trying to shrink users profile url for vb 4.2.1 like this:

from
mydomain.com/member.php?u=330

to

mydomain.com/admin

so basically I want to remove member.php and the id number and leave only the username...

any idea how to do that??

Thanks

Lynne
09-22-2013, 03:01 PM
Please check the articles section because there is an article on how to do this (although it may have /members in the URL, I can't remember, but you can modify it for your own purposes).

fxdigi-cash
09-22-2013, 03:20 PM
Thanks @Lynne for the comments.

any idea what articles section that would be??? is it articles vb4??

because I search around, but got nothing so far...

goxy63
09-22-2013, 04:26 PM
do a good search omg :D
https://vborg.vbsupport.ru/showthread.php?t=165986

fxdigi-cash
09-22-2013, 11:52 PM
do a good search omg :D
https://vborg.vbsupport.ru/showthread.php?t=165986

Thanks@goxy,

I think I mentioned I use vb4.2.1 :D and that article is for vb3. I also tried to adjust the instructions there and apply it on my vb4, but didn't work. There are some major differences and because of that the article you provided is out-dated one.

Thanks for trying anyways.

Anyone has an idea how to fix this??

goxy63
09-23-2013, 09:41 AM
You should read whole article, that is rewrite code and does not matter what version of VB u have its rewriting URLs. You need to find a way to adjust it to your site, try it out bit more sure it will work if you find right code.

I will try it out also these days, planing to do so after "mod rewrite" my urls

fxdigi-cash
09-24-2013, 02:19 PM
You should read whole article, that is rewrite code and does not matter what version of VB u have its rewriting URLs. You need to find a way to adjust it to your site, try it out bit more sure it will work if you find right code.

I will try it out also these days, planing to do so after "mod rewrite" my urls

I did, I read the article many times, but it seems that some function don't exist anymore. Besides, the following code can't do anything since $username variable have no affect on
vb url as I tested it.



RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://www.mydomain.com/forums/blog.php?username=$1 [R]


I believe there must be a way how to do this using .htaccess only, but not sure how??

VB support should know this, I guess...

goxy63
09-25-2013, 12:14 AM
yes they probably do but this is not VB default code and you can forget about their help, they have better things to do and this is not part of their job

try to find how to do it by yourself and share it here, best way share it in that thread as its all about that and has more info about it than this one.

I just try it out had no changes on my side

good luck

Lynne
09-25-2013, 06:14 PM
Doing rewrites is a trial and error thing for me. I google it and then test it on my test site until I get it right.

fxdigi-cash
09-25-2013, 08:08 PM
Doing rewrites is a trial and error thing for me. I google it and then test it on my test site until I get it right.

Great to hear that, but would you mind sharing how you solved it, please??

Thanks in advance, Lynne.

Lynne
09-25-2013, 09:58 PM
I have never had any interest in doing this to my site, so I never tried. I would have posted what I used if I had done this.