Jump to content

Recommended Posts

Hey,
I would like to know if anyone knows how to make a non-existent directory redirectoy redirect to ...lets say a profile...
for example like how it is done on myspace.com ....where they hape [a href=\"http://www.myspace.com/user\" target=\"_blank\"]http://www.myspace.com/user[/a]
and that then redirects to the users profile...
any help would be greatly appreciated...

thanks alot
As far as know, what you believe to be used on myspace can't be done (if I understand correctly). It's simply because a webserver doesn't "make up" directories. An index file can redirect, or maybe they use url masking, but generally what you ask can't be done.
[!--quoteo(post=376761:date=May 24 2006, 11:01 PM:name=gtridez)--][div class=\'quotetop\']QUOTE(gtridez @ May 24 2006, 11:01 PM) [snapback]376761[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hey,
I would like to know if anyone knows how to make a non-existent directory redirectoy redirect to ...lets say a profile...
for example like how it is done on myspace.com ....where they hape [a href=\"http://www.myspace.com/user\" target=\"_blank\"]http://www.myspace.com/user[/a]
and that then redirects to the users profile...
any help would be greatly appreciated...

thanks alot
[/quote]

user appache mod_rewrite module.....

create an .htaccess file at your root directory, and put this code in it:
[code]RewriteEngine on
RewriteRule ^user$ userProfile.php [NC,L][/code]
[!--quoteo(post=377271:date=May 26 2006, 06:44 AM:name=burhankhan)--][div class=\'quotetop\']QUOTE(burhankhan @ May 26 2006, 06:44 AM) [snapback]377271[/snapback][/div][div class=\'quotemain\'][!--quotec--]
user appache mod_rewrite module.....

create an .htaccess file at your root directory, and put this code in it:
[code]RewriteEngine on
RewriteRule ^user$ userProfile.php [NC,L][/code]
[/quote]


hey..thanx...
yes i was informed to use the mod_rewrite rule and i have already found a solution....similar to yours...thanks alot tho!
I am not sure if i get you but you could edit your 404 page so taht if the page is not found then you have the 404 page

contain
<meta http-equiv="refresh" content="2;URL=http://www.pagetogoto.com">

and where content is the number of second to wait for the redirect 0 for instant let me know if this helps
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.