htaccess to redirect a changed username

Hi - I have a user who has changed their username. Is there an easy rewrite code I can add to the htaccess file to simply redirect all requests for their old profile to their new username?

I tried Rewrite 301 /oldname /newname . That took the site down momentarilly Embarassed

Thanks

Dan V

Quote · 4 Nov 2008

Most of mine are temporary redirects without using the 301 but you should be able to add it pretty easy. I would guess that your problem is you didn't include the full path where you want it redirected to in the second part of your statement.

Example:
Redirect temp /oldname http://www.yoursite.com/newname

Be sure you do not use the http://www in the first part, but be sure you do specify the full path with the http:// in the second part where you want it to actually go as listed above.

Wrong
Redirect temp /oldname /newname

Right
Redirect temp /oldname http://www.yoursite.com/newname


gameutopia

DialMe.com - Your One and Only Source For Boonex Dolphin Tutorials and Resources
Quote · 7 Nov 2008

Hi Gamer - when I do that I get a page not found with the URL http://www.mysite.com/newname?ID=oldname

Any suggestions?

Thanks

Dan V

Quote · 8 Nov 2008

Hi Gamer - when I do that I get a page not found with the URL http://www.mysite.com/newname?ID=oldname

Any suggestions?

Thanks

Dan V

it appears from your post that you have something reversed, as it should say:

URL http://www.mysite.com/oldname?ID=newname

gameutopia is that correct, but i would never rely on the redirect. moreso why would the user change their name, also, i wonder why you couldnt login to the dbase, and just change the old username to the new username and then run the redirect.

seems hokie, good luck.

DosDawg

When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support
Quote · 8 Nov 2008

well the reason to not just change the name is that any links he has given out will not work then.

Its actually me that wants his name changed for reasons I wont go into here.

But I dont want links already made to his page to get a 404 !

I want them to redirect to his new name.

Preferable his blog posts should also redirect to the new name - but that sounds rather complicatted unliess anyone can show me how to use htaccess to redirect */oldusername/* to */newusername/*

So I guess I will persist with the advice below and see if I can make it work.

Thanks

Dan V

Quote · 11 Nov 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.