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 6375857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:40:10+00:00 2026-05-25T01:40:10+00:00

so my url is currently: http://www.mywebsite.com/search.php?keyword=stack+overflow I’m wanting to have it accessible as: http://www.mywebsite.com/?s=stack+overflow

  • 0

so my url is currently:

http://www.mywebsite.com/search.php?keyword=stack+overflow

I’m wanting to have it accessible as:

http://www.mywebsite.com/?s=stack+overflow

Now I’ve also implemented rewrites for .php files as below

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

I’m a little confused now because the search.php is being rewritten to just search but is still accessable with search.php, so when I create my rewrite rule do I rewrite search.php or just search?.. either way I’ve tried and failed to accomplish it lol.

What should I add to have my desired url? Help is much appreciated 🙂

  • 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-05-25T01:40:11+00:00Added an answer on May 25, 2026 at 1:40 am

    It’s impossible to change parameter name with mod_rewrite. The easiest way to achieve what you want is to add these lines to .htaccess:

    RewriteCond %{QUERY_STRING} ^s=
    RewriteRule .? search.php [L]
    

    and modify search.php to react to s get parameter the same as it reacts to keyword.

    An alternative is to keep .htaccess intact and add these at the top of index.php:

    if (!empty($_GET['s'])) {
        $_GET['keyword'] = $_GET['s'];
        require __DIR__ . '/search.php';
        exit;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of URLs such as, http://www.mywebsite.com/page.php?genus=A_GENUS&species=A_SPECIES&id=12345 . I would like to
I'm writing a Stack Overflow API wrapper , currently at http://soapidotnet.googlecode.com/ . I have
I have a string like this The theme song of whatever - http://www.anydomain.com/pop_new.php?sid=10623&aid=1581&rand=0.6808111508818073 #string
Currently my website formats url this way: http://www.filmitem.com/film/f152/ This page is already indexed by
For my site I have a RewriteRule that points the URL http://www.mysite.com/work to a
I have the following XML: <links> <item> <title>Title 1</title> <url>http://www.example.com/url-1</url> </item> <item> <title>Title 2</title>
Basically, this is what I currently use in an included file: $sites[0]['url'] = http://example0.com;
My page's URL is like this: http://www.mydomain.com/directory/thisismy_page.html Using JavaScript, I want to pull out
This is the code I'm putting on my website: <iframe src=http://www.facebook.com/plugins/like.php?app_id=5766773068&amp;href&amp;send=false&amp;layout=standard&amp;width=47&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35 scrolling=no frameborder=0 style=border:none;
Here you can test the website i'm currently working on: http://www.whateverxpress.com/wx_site/ When you navigate

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.