Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Shorter Profile Url
CallieJo's Avatar
CallieJo
Join Date: May 2004
Posts: 85

 

Snowville
Show Printable Version Email this Page Subscription
CallieJo CallieJo is offline 12-22-2007, 10:00 PM

What does it do?
It produces a short profile url like so: yourdomain.com/username

Do you guarantee it will work on my server?
No.

Will you support this if I cannot get it to work for me?
I cannot guarantee this will work for everyone and therefor I will not support this.

Will this work with usernames that have special characters or spaces in them?
I don't know. I have only tested it on my test forum with a few usernames that don't have special characters or spaces in them. If it works for you, please let others know.

How can I tell my members about the shorter profile url?
That is something you will need to figure out.
Or view my update post here to show it in their profiles: https://vborg.vbsupport.ru/showthrea...46#post1435246

If this does not work for me, can you suggest another one?
VBseo
Zoints
Nuhit.com

Insert the following code in your .htaccess file (You might want to read the whole thread for other code examples that might work best for you):
Code:
RewriteEngine on
RewriteRule ^/?([a-zA-Z0-9]+)$ member.php?username=$1 [L]

Credits/References:
SitePoint
Vbulletin.com Thread
Zamurick X
Apache Module mod_rewrite
Reply With Quote
  #32  
Old 10-14-2008, 08:03 PM
jerx jerx is offline
 
Join Date: Feb 2006
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anybody know which characters will cause problems with this mod? Spaces seem to be a big problem.

It looks like this similar mod does not have any problems with special characters and spaces:
https://vborg.vbsupport.ru/showthrea...rofile+rewrite

Does that work for anyone?
Reply With Quote
  #33  
Old 04-12-2011, 10:18 PM
jdebler jdebler is offline
 
Join Date: Sep 2002
Location: Detroit
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using this and it works fine, here is what I have in my /blog/ directory .htaccess file:

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://www.mydomain.com/forums/blog.php?username=$1 [R]
But I am wondering if a directory is needed and if this cannot be done in the .htacces file in the main site directory.

I tinkered around with mine, and the closest I came to making it work was by adding the following code to my other lines of code in my .htaccess file in my main site directory:

Code:
redirectmatch 301 /blog(/.*)?$ http://www.mydomain.com/forums/blog.php?username=$1
The end result was close, but no cigar...

By going to
http://www.mydomain.com/blog/username
the end result is

http://www.mydomain.com/forums/blog.php?username=/username

That slash before the user name is what breaks it. Anyone know how to fix this?
Reply With Quote
  #34  
Old 04-27-2011, 10:01 AM
bigs15 bigs15 is offline
 
Join Date: Oct 2006
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am having a Problem.
When i go to.
http://mysite.com/username
the User id opens
but when i go to
http://mysite.com/member.php?u=2
then also member profile opens ..how do i remove this urls

http://mysite.com/member.php?u=2
Reply With Quote
  #35  
Old 09-22-2013, 08:47 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tried this and didn't work for vb4.2.1
Reply With Quote
  #36  
Old 01-18-2015, 07:49 PM
Buzzle Buzzle is offline
 
Join Date: Apr 2012
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for gravedigging but can someone convert this to nginx?
Reply With Quote
  #37  
Old 02-18-2015, 08:18 PM
CallieJo's Avatar
CallieJo CallieJo is offline
 
Join Date: May 2004
Location: Snowville
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Buzzle View Post
Sorry for gravedigging but can someone convert this to nginx?
Sorry, I'm not familiar with that. You might try a forum dedicated to nginx. They might be able to convert the rewrite rule to something you can use.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04136 seconds
  • Memory Usage 2,257KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete