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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:58:33+00:00 2026-06-08T09:58:33+00:00

I developed a small custom MVC framework for my website. it’s index.php check $_POST[‘page’]

  • 0

I developed a small custom MVC framework for my website. it’s index.php check $_POST[‘page’] & $_POST[‘subpage’] and includes related php file for specified parameter.

Ex: index.php?page=foods (this includes view/foods.php)

Ex: index.php?page=foods&subpage=pizza (this includes view/foods/pizza.php)

Now I want to clean my URLS using .htaccess. I tried few methods to pass second parameter. But I failed. This works fine…

RewriteEngine on
RewriteRule ^([^/\.]+)?$ index.php?page=$1 [L]

But when i tried to pass second parameter its not working fine. This one change css/js/iamges path.

RewriteEngine on
RewriteRule ^([^/\.]+)?$ index.php?page=$1

RewriteRule ^([^/\.]+)/([^/\.]+)?$ index.php?page=$1&sub=$2
  • 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-08T09:58:35+00:00Added an answer on June 8, 2026 at 9:58 am

    If you use the QSA (Query String Apend) flag, you can simply pass the entire request string to an index file –

    QSA – Appends any query string from the original request URL to any query string created in the rewrite target

    So your rule would look similar to this –

    RewriteRule %{REQUEST_FILENAME} !-d
    RewriteRule %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+)$ index.php?uri=$1 [QSA,L]
    

    In your index file you can .explode() by slashes –

    $splitArr = explode('/',$_GET['uri']);
    

    And/or use the built in parse_url() function – http://www.php.net/manual/en/function.parse-url.php

    parse_url — Parse a URL and return its components

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

Sidebar

Related Questions

I have developed a small administration page for game servers which you can add/remove/edit
I have developed a small download system in PHP, where files are downloaded through
I have just created a mid-sized web-application using Java, a custom MVC framework, javascript.
I developed a (small) company website in Visual Studio, and I'm addicted to learning
I have developed a small component which can be put in to any website.
I've developed custom HTTP module that processes .aspx page (it just sets app.Response.Filter for
I have developed a small application based on Play Framework (I am still learning).
I am in the middle of creating my own custom MVC web framework for
I developed small CakePHP application, and now I want to add one more table
Hi i developed small web application, in that all the functionality working fine but

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.