Jump to content

Archived

This topic is now archived and is closed to further replies.

Vex

Irregular Redirection

Recommended Posts

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.net/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]

Share this post


Link to post
Share on other sites
You've just answered your question by using the "http://www.thevex.net/blogs.php?id=5" thing.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
[!--quoteo(post=364805:date=Apr 14 2006, 03:41 PM:name=redbullmarky)--][div class=\'quotetop\']QUOTE(redbullmarky @ Apr 14 2006, 03:41 PM) [snapback]364805[/snapback][/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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.