Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles

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
  #2  
Old 12-23-2007, 08:56 PM
Zamurick X Zamurick X is offline
 
Join Date: Dec 2007
Location: Canada (BC)
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great. I would like to add that you may want to remove the "/" from the .htaccess mod_rewrite. That will allow users who have their forums in another directory to use this. Because if I were to put the .htaccess in my /forum/ directory, and I went to "www.w.xyz/forum/username", it would most likely give me a 404, saying that "www.w.xys/member.php" does not exist. Thanks for the modification.
Reply With Quote
  #3  
Old 12-23-2007, 09:51 PM
CallieJo's Avatar
CallieJo CallieJo is offline
 
Join Date: May 2004
Location: Snowville
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zamurick X View Post
This is great. I would like to add that you may want to remove the "/" from the .htaccess mod_rewrite. That will allow users who have their forums in another directory to use this. Because if I were to put the .htaccess in my /forum/ directory, and I went to "www.w.xyz/forum/username", it would most likely give me a 404, saying that "www.w.xys/member.php" does not exist. Thanks for the modification.
Thank you. I've updated the code to reflect your suggestion and another change I found on the Apache site.
Reply With Quote
  #4  
Old 12-23-2007, 10:53 PM
hocphp hocphp is offline
 
Join Date: Nov 2007
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i' ll downloading this mod for research and use
Reply With Quote
  #5  
Old 12-23-2007, 11:55 PM
CallieJo's Avatar
CallieJo CallieJo is offline
 
Join Date: May 2004
Location: Snowville
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your welcome
Reply With Quote
  #6  
Old 12-24-2007, 12:40 AM
aycan555 aycan555 is offline
 
Join Date: Dec 2005
Location: www.ultrapaylasim.com
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

but we got the foregn alfabets like my board there is turkish caracters user name; like these

Ayse
Ayşe

now both users url are going to be same, i am currently using it with siteurl/userid-username
Reply With Quote
  #7  
Old 12-24-2007, 03:45 AM
JawadIT JawadIT is offline
 
Join Date: Jan 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello
thanks for the mod
but the thing is that i am not knowing how and where to put that code...so could you please give us a brief explanation

thanks again
Reply With Quote
  #8  
Old 12-24-2007, 09:33 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not a modification, moved to articles section.
Reply With Quote
  #9  
Old 12-24-2007, 05:41 PM
CallieJo's Avatar
CallieJo CallieJo is offline
 
Join Date: May 2004
Location: Snowville
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JawadIT View Post
hello
thanks for the mod
but the thing is that i am not knowing how and where to put that code...so could you please give us a brief explanation

thanks again
Place the code provided into your .htaccess file. If you do not have that file in the root of your forum, here is how to create one:

Quote:
Originally Posted by http://www.htmlite.com/HTA003.php
You don't need any special program or hardware to create an htaccess file. In fact, all you need is a regular, simple text editor such as Notepad.

Now the tricky part is saving the file. The htaccess file is a no-name filename with an eight letter extension.
".htaccess"

When you save files in a text editor, it will usually add a default extension to files, so you might end up with...
".htaccess.txt"

Here is how you fix this problem :
File
Save As...
In the FILE TYPE box, choose ALL FILES
In the FILE NAME box, type in ".htaccess"
And be sure you used quotes around the filename when you typed it in.

If that doesn't work, your FTP program should let you do a RENAME on a file to make it right.
--------------- Added [DATE]1198525319[/DATE] at [TIME]1198525319[/TIME] ---------------

Quote:
Originally Posted by Marco van Herwaarden View Post
Not a modification, moved to articles section.
Thank you. I wasn't sure where to place this.
Reply With Quote
  #10  
Old 12-25-2007, 02:13 PM
vuiveclub vuiveclub is offline
 
Join Date: Dec 2006
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I rewrite some unicode characters as "â ă â ã ạ ả á à ắ ầ " etc to "English character if I use this Rewrite?
Reply With Quote
Reply

Thread Tools

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 08:21 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.05315 seconds
  • Memory Usage 2,286KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (4)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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