iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Closed Thread
 
LinkBack Thread Tools
Old April 2nd, 2004, 04:13 AM   #1
New Member
 

Join Date: Apr 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 iamzoli is on a distinguished road
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)
iamzoli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 2nd, 2004, 05:36 AM   #2
WebForumz Member
 

Join Date: Feb 2004
Location: Woodbridge, UK
Age: 28
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Trebz is on a distinguished road
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.
Trebz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 2nd, 2004, 06:11 AM   #3
New Member
 

Join Date: Apr 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 iamzoli is on a distinguished road
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.
iamzoli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 2nd, 2004, 06:26 AM   #4
WebForumz Admin Badge
 

Join Date: Jul 2003
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 114 Webforumz Staff is on a distinguished road
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.
Webforumz Staff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 2nd, 2004, 02:26 PM   #5
WebForumz Admin Badge
 

Join Date: Jul 2003
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 114 Webforumz Staff is on a distinguished road
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.
Webforumz Staff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 3rd, 2004, 04:43 AM   #6
New Member
 

Join Date: Apr 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 iamzoli is on a distinguished road
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
iamzoli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 3rd, 2004, 05:07 AM   #7
Highly Reputable Member
 

Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 courtjester is on a distinguished road
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.
courtjester is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 3rd, 2004, 05:13 AM   #8
New Member
 

Join Date: Apr 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 iamzoli is on a distinguished road
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.
iamzoli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 10th, 2004, 12:14 PM   #9
Si
New Member
 

Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Si is on a distinguished road
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.
Si is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 10th, 2004, 06:10 PM   #10
WebForumz Admin Badge
 

Join Date: Jul 2003
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 114 Webforumz Staff is on a distinguished road
No Si, he wants the redirecting to occur, but the address bar should show the first URL, not the redirected one.
Webforumz Staff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 11th, 2004, 03:12 AM   #11
WebForumz Admin Badge
 

Join Date: Jul 2003
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 114 Webforumz Staff is on a distinguished road
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
Webforumz Staff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 11th, 2004, 04:55 AM   #12
Si
New Member
 

Join Date: Apr 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Si is on a distinguished road
<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
Si is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Old April 11th, 2004, 05:48 AM   #13
WebForumz Admin Badge
 

Join Date: Jul 2003
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 114 Webforumz Staff is on a distinguished road
He said he didn't want to use frames [:P]
Webforumz Staff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Bookmarks

Tags
redirection , problem


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 4 June 4th, 2007 02:35 PM
Upload redirection Ross PHP 8 February 28th, 2007 08:32 PM
remove redirection expressweb Implemented Suggestions 6 July 21st, 2005 07:24 PM
Problem with DTHML Browser detection/redirection mjance HTML, XHTML and CSS 3 October 15th, 2003 04:02 PM


Search Engine Optimization by vBSEO 3.2.0 RC8