Shorter Profile Url
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 Credits/References: SitePoint Vbulletin.com Thread Zamurick X Apache Module mod_rewrite |
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.
|
Quote:
|
i' ll downloading this mod for research and use
|
Your welcome;)
|
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 |
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 |
Not a modification, moved to articles section.
|
Quote:
Quote:
Quote:
|
How can I rewrite some unicode characters as "â ă â ã ạ ả á à ắ ầ " etc to "English character if I use this Rewrite?
|
Nice one. I'm going to try it. Much simpler than the other method that was posted.
|
Also does this regex support numbers? It appears it only supports a-z as the first character of the user name.
Try changing it to: Code:
RewriteEngine on |
Quote:
|
Here is the code I'm currently using (I have other stuff in it but this will pertain to this article):
Code:
Options +FollowSymLinks If you are using 3.7.0 beta 4 and want to change the url in member profiles to reflect their new profile url so they know what it is... Edit the template "memberinfo_block_contactinfo" and find this code: Code:
<dd><a href="$prepared[profileurl]">$prepared[profileurl]</a></dd> Code:
<dd><a href="http://www.yoursite.com/$userinfo[username]">http://www.yoursite.com/$userinfo[username]</a></dd> |
I would suggest using:
RewriteEngine on RewriteRule ^(.*)/?$ member.php?username=$1 [L] When you have (.*), that can stand for any letter, number, or symbol. |
Quote:
|
This works for most people on my forum, but not for any with special characters in their name, like myself. Any way to fix this?
|
Quote:
|
I do, because one of the supporters of this, Zamurick, actually fixed the problem for me. I'll ask if it can be posted here.
|
Quote:
|
Here's what I used in the .htaccess file:
RewriteEngine on RewriteBase /Board/upload/ RewriteRule ^u-(.+)/?$ member.php?username=$1 [L] For you, it'd be like: RewriteEngine on RewriteBase [board directory starting with /] RewriteRule ^u-(.+)/?$ member.php?username=$1 [L] And you have the addresses as [yoursiteaddress.com]/[yourforumdirectory]/u-[username] |
Quote:
|
How can I make it so that usernames with spaces put an underscore between their first and last names instead of the %20 thing?
|
bump
|
bump
|
I'm curious about the %20 thing as well, names with spaces are causing a problem
|
I can't even get users with spaces in there names to work.
|
Yeah, that's the same problem we're having. Anybody have a fix for this? I could really use this mod.
|
bump
|
Is there anyone who is willing to write this hack in a simple foolproof version for all users? I'm willing to donate $50
|
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? |
I am using this and it works fine, here is what I have in my /blog/ directory .htaccess file:
Code:
RewriteEngine On 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 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? |
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 |
tried this and didn't work for vb4.2.1
|
Sorry for gravedigging but can someone convert this to nginx?
|
Quote:
|
All times are GMT. The time now is 01:55 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|