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.
|
|
|
|
|
![]() |
||
redirection problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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) |
|
|
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
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
|
|
#7
|
|||
|
|||
|
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.
|
|
#8
|
|||
|
|||
|
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. |
|
#9
|
|||
|
|||
|
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.
|
|
#10
|
|||
|
|||
|
No Si, he wants the redirecting to occur, but the address bar should show the first URL, not the redirected one.
|
|
#11
|
|||
|
|||
|
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
|
|
#12
|
|||
|
|||
|
<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 |
|
#13
|
|||
|
|||
|
He said he didn't want to use frames [:P]
|
![]() |
| Tags |
| redirection, problem |
| Thread Tools | |
|
|
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 |