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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:50:15+00:00 2026-06-08T13:50:15+00:00

I am coming from the IIS world to Apache and would appreciate some help

  • 0

I am coming from the IIS world to Apache and would appreciate some help on the rewrite rules.

I want this relative path:

/index.php?go=order&id=12345

to be rewritten as:

/go/order/id/12345

Also, if there are more parameters, they should be converted to path format:

/index.php?go=order&id=12345&action=process

becomes

/go/order/id/12345/action/process

How do I achieve this please? Thanks for any input.

  • 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-08T13:50:17+00:00Added an answer on June 8, 2026 at 1:50 pm

    Try putting this in your vhost config:

    RewriteEngine On
    
    # Start converting query parameters to path
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?[^\ ]+
    RewriteCond %{QUERY_STRING} ^([^=]+)=([^&]+)&?(.*)$
    RewriteRule ^(.*)$ $1/%1/%2?%3 [L]
    
    # done converting, remove index.php and redirect browser
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\?[^\ ]+
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule ^/index.php/(.*)$ /$1 [R=301,L]
    
    # internally rewrite paths to query strings
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/index\.php
    RewriteRule ^/([^/]+)/([^/]+)/?(.*) /$3?$1=$2 [L,QSA]
    
    # No more path, rewrite to index.php
    RewriteRule ^/$ /index.php [L]
    

    These rules will make it so if you type in a URL like http://yourdomain.com/index.php?a=b&1=2&z=x in your browser, the browser will get redirected to http://yourdomain.com/a/b/1/2/z/x. When the clean looking URL gets requested, the 2nd set of rules internally rewrites it back to /index.php?a=b&1=2&z=x. If you want to put these rules in an htaccess file (in your document root), you need to remove all the leading slashes in the RewriteRule‘s. So ^/ needs to be ^ in the last 3 rules.

    Note that if you simply go to http://yourdomain.com/index.php, without a query string, nothing gets rewritten.

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

Sidebar

Related Questions

Hi pardon my ignorance i'm coming from an apache background. On IIS/ASP.NET (.NET 4.0)
I want to compress responses coming from my IIS Express driven web application. We're
Coming from a Relational world things are obviously very different with the Azure Table
Coming from PHP with some Java Struts 2.0 experience any tips/tricks on learning GWT?
Coming from the MS SQL world, I tend to make heavy use of stored
I'm relatively new to the Windows Server world (coming from *nix land). I'm used
I'm coming from a WebForms world where all logic is located in the codebehind
I'm coming from the LAMP world, where the cache everything mentality is prevalent. Everything
I'm coming from the open source world, and interested in giving ASP.NET a spin.
Coming from ASP.NET Webform and Classic ASP. I want to know what are the

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.