redirection problem

This is a discussion on "redirection problem" within the PHP Forum section. This forum, and the thread "redirection problem are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Apr 2nd, 2004, 08:13
New Member
Join Date: Apr 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
redirection problem

Hello guy's if somebody could help .......
i try to do the folowing
if you type in the adress bar the folowing URL www.test.com/test4/
i want the browser to open www.test.com/test.php?option=test4 but
the address should keep the same www.test.com/test4/(visualy meant)



any idea's
P.S And if a user types www.test.com/ all the time when he navigates the page,the address should not change www.test.com/ (the page must contain no frames)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Apr 2nd, 2004, 09:36
Up'n'Coming Member
Join Date: Feb 2004
Location: Woodbridge, UK
Age: 27
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
why would you want to do that in the first place? Not to mention the fact that you cant do it without frames.

the best you could do is use: www.text.com/?option=test4 (thus removing the test.php part, assuming test.php is the default document.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Apr 2nd, 2004, 10:11
New Member
Join Date: Apr 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
If you go on a php page and navigate through it, then the adress bar and the history will remember the adresses you visited ex www.test.com/test.php?option=test4 www.test.com/test.php?option=test3 www.test.com/test.php?option=test1 www.test.com/test.php?option=test9 etc. My client want something like if he will enter www.test.com/test4/ to be directed to the www.test.com/test.php?option=test4 and the url to remain the same in the adress bar.
I have done this with the help of java class serplets but i want to use a simpler solution.
Because i want the site to procees fast.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Apr 2nd, 2004, 10:26
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
The only cross-browser effective way to do this is to use frames...

However I am confused as to WHY anyone would want to do that? If anything it makes life harder - people can't bookmark your pages easily and all sorts of problems show up.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Apr 2nd, 2004, 18:26
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
You can set up a custom 404 error page that examines the URL the person was trying to use, manipulates the string in the way you're thinking into a new URL, and then redirects it.

This may not be any faster.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Apr 3rd, 2004, 08:43
New Member
Join Date: Apr 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
ok tank's a lot guy's for you time. I will try the ideea that Catalyst wrote me if it work's i will notify you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Apr 3rd, 2004, 09:07
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Ok this is closed I know.. but I had a question.... Is PHP like ASP, where you can create a cookie in the homepage and then delete that cookie after the browser is closed? Then you can put on all other pages to check for that cookie and if it exists then give access and if it doesnt send to an error page? Just wondering.. Im still learning ASP by the way; so please be gentle.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old Apr 3rd, 2004, 09:13
New Member
Join Date: Apr 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
yes i is but that does not solve the problem because my client want's no frames no cookies.
He sad "you no there are people that are setting there browser to not accept cookie's and to not accept frames.So please find another solution".So here i am.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #9  
Old Apr 10th, 2004, 15:14
Si Si is offline
New Member
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
so you want a script that redirect you to somethin if you goto test.com/test4. Well an easy way is to rename the file that redirects to index and then wen u type in test.com/test4 it will run the redirecting file.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #10  
Old Apr 10th, 2004, 21:10
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
No Si, he wants the redirecting to occur, but the address bar should show the first URL, not the redirected one.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #11  
Old Apr 11th, 2004, 06:12
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Oh, I didn't catch the showing the first URL part. In that case you want the custom 404 error page to use Server.Execute rather than Response.Redirect
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #12  
Old Apr 11th, 2004, 07:55
Si Si is offline
New Member
Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by Sirkent

No Si, he wants the redirecting to occur, but the address bar should show the first URL, not the redirected one.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

ah right, well im guessing frames then
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #13  
Old Apr 11th, 2004, 08:48
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
He said he didn't want to use frames [:P]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
redirection, problem

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Redirection madmax PHP Forum 4 Jun 4th, 2007 17:35
Upload redirection Ross PHP Forum 8 Feb 28th, 2007 23:32
remove redirection expressweb Implemented Suggestions 6 Jul 21st, 2005 22:24
Problem with DTHML Browser detection/redirection mjance Web Page Design 3 Oct 15th, 2003 19:02


All times are GMT. The time now is 16:12.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42