Click here to Skip to main content
13,869,015 members
Rate this:
Please Sign up or sign in to vote.
I want to change the URL of a search page.
For Example, if someone searches on my website then the URL is
I want to change it to something like

How do I do this using PHP or .htaccess file

What I have tried:

I have used it in my .htaccess but it didn't work for me...
RewriteEngine On
    RewriteRule ^search.php?search=(.*)$$1 [L,R=301]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.190214.1 | Last Updated 8 Dec 2018
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100