![]() |
Redirect member.php
I have shorter url for profile ex. http://www.mysite.com/Username
Is there a way to redirect the default member.php?u=1 to http://www.mysite.com/Username? |
Yes - by using a plugin to smartly do redirects based on URL.
|
Not very good with plugin, but should I put the hook as global_start? Also how would the php code look, pseudocode is fine, just want to get an idea on how to do this.
|
Plugin should be at member_execute_start, because anything before does not have the username fetched.
|
Got it to work
PHP Code:
|
You have to check that the URL is not already in the correct format - see the PHP server environment variables. Also, you do not need that conditional, you are already running the plugin only in member.php.
|
Thanks, Dismounted. You were alot of help.
|
All times are GMT. The time now is 01:47 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|