Redirect to search page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
badihi
Forum Newbie
Posts: 15
Joined: Sun Jul 05, 2009 1:16 am

Redirect to search page

Post by badihi »

Hello there.
How can I do this:
If user typed this address:
http://mysite.com/word
He/She redirect to this address:
http://mysite.com/search.php?keyword=word
:?:
ricehigh
Forum Newbie
Posts: 21
Joined: Mon Sep 14, 2009 5:18 pm

Re: Redirect to search page

Post by ricehigh »

There's a wonderfull guide here: http://corz.org/serv/tricks/htaccess2.php

Be aware though, that your folders could have the same url as the search. I think it would be better if you constructed it like http://mysite.com/search/word, but that is, of course, up to you :)
badihi
Forum Newbie
Posts: 15
Joined: Sun Jul 05, 2009 1:16 am

Re: Redirect to search page

Post by badihi »

Sorry! But I can't access that page.
Please put another one.
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: Redirect to search page

Post by papa »

User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Redirect to search page

Post by jackpf »

Just google mod rewrite.
Post Reply