Jump to content


Photo

Irregular Redirection


  • Please log in to reply
3 replies to this topic

#1 Vex

Vex
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 April 2006 - 02:44 PM

Hi.

I'm running a website where I'm thinking about offering an extended blog service/profile. What I want to do is offer a simplified URL for members to have directed to their profile.

For example, users of MySpace etc would have "http://www.myspace.com/username" and that would be their address. Its relatively easy to remember and works.

What I want to know, is there a way of having "http://www.thevex.net/username" redirect to say "http://www.thevex.ne...blogs.php?id=5" without using folders?

I just don't like the idea of having hundreds of uniquely named folders cluttering up my root folder.

Any help is appreciated, thanks.

Daniel
[a href=\"http://www.thevex.net\" target=\"_blank\"]http://www.thevex.net[/a]
TheVex.[span style=\'color:red\']net[/span]

Your Source of Confusion
www.thevex.net

#2 Yesideez

Yesideez
  • Members
  • PipPipPip
  • Advanced Member
  • 2,334 posts
  • LocationDevon, UK

Posted 14 April 2006 - 03:40 PM

You've just answered your question by using the "http://www.thevex.ne...blogs.php?id=5" thing.
Not a pro just an enthusiast :)

if (empty($coffee)) {$coffee=new coffee();}

Please surround any code using the CODE tags - I rarely look at anything without them

#3 redbullmarky

redbullmarky
  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 14 April 2006 - 03:41 PM

apache's mod_rewrite is the best for this. the last topic i remember is here, worth a read: [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=89102\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=89102[/a]
"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#4 Vex

Vex
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 15 April 2006 - 04:43 AM

[!--quoteo(post=364805:date=Apr 14 2006, 03:41 PM:name=redbullmarky)--][div class=\'quotetop\']QUOTE(redbullmarky @ Apr 14 2006, 03:41 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
apache's mod_rewrite is the best for this. the last topic i remember is here, worth a read: [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=89102\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=89102[/a]
[/quote]

Hi! Thanks for the prompt feedback.

I've check the thread and have acted upon the information there, but for some reason my .htaccess isnt being recognised?

I couldn't make a .htaccess file, so I created one using a quick script using PHP. I have put it in the root directory but it doesnt seem to work. I tried a few different .htaccess scripts, like default 404 (incase what I put in there previously wasnt working) and that didn't seem to do anything either.

Any suggestions?

PS. I'm running apache from a Windows XP Pro machine.

TheVex.[span style=\'color:red\']net[/span]

Your Source of Confusion
www.thevex.net




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users