Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8636923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:20:56+00:00 2026-06-12T10:20:56+00:00

What is the best way to do when I type a search on my

  • 0

What is the best way to do when I type a search on my site to get the url like mysite.com/searach/blabla/video instead of mysite.com/?search=blabla&type=video.
Please don’t tell me that I have to use CodeIgniter because it doesn’t help. I am sure that all I need is a small function in PHP.

This is my search.php:

<form id="searchwrapper" name="searchform">
<input type="text" class="searchbox" id="txtSearch" name="search" alt="Search Criteria" />
<input type="submit" src="../images/empty.png" class="searchbox_submit"/>

<p id="circ">
<input  type="radio" id="mp3" name="type" checked value="mp3"/>
<label class="circ-btn normal" for="mp3">mp3</label>
                        </p>
<p id="circ">
<input type="radio" id="album" name="type" <?php echo $radio2;?> value="album"/>
<label class="circ-btn normal" for="album">Album</label></p>                
</form>

My .htacces rules are set correctly; when I access my site directly using mysite.com/searach/blabla/video, it works fine, but this is not the issue. I need to have my link like this when I type a search on my site. Instead I get this link and is not right mysite.com/?search=blabla&type=video.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:20:57+00:00Added an answer on June 12, 2026 at 10:20 am

    As others commented, you need mod_rewrite if you’re using apache.

    If you actually want to type in a search and end up at a SEF URL, as you described, you want something like:

    RewriteCond %{QUERY_STRING} ^search=(\w+)&type=(\w+)$
    RewriteRule ^ http://mysite.com\/%1\/%2? [R,L]
    

    .. which would redirect requests such as

    http://mysite.com/index.php?search=A&type=B
    

    .. to

    http://mysite.com/A/B
    

    .. and JKirchartz provided the sample to use a php script for a SEF url, for example, having apache serve

    http://mysite.com/video.php?search=A&type=B
    

    .. behind the scenes when

    http://mysite.com/A/B
    

    .. is requested

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Best way to find Browser type & version? In HTML/JavaScript, How can
can someone explain the best way to get around the following, rather curious type
Can you suggest a best way to define money type in F#?
What is considered the best way to expose a type to another application over
What's the best way (in .NET 4) to create an instance of a type
Would following the table below be the best way of determining the access type
I need to write AVL-tree with generic type in C. The best way I
Simple question, what is the best way on windows to search the documentation. This
I'd like to write small scripts which feature incremental search (find-as-you-type) on the command
We need to implement a search filter (Net-log like) for my social networking site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.