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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:44:11+00:00 2026-06-05T19:44:11+00:00

There is a rewrite rule ensuring that all URL’s head to index.php and maintain

  • 0

There is a rewrite rule ensuring that all URL’s head to index.php and maintain a ‘pretty format’.

I still need to get information from them to work out what page to send the user.

Say there is a Url

http://localhost/telephones/nokia

I need to find out the SQL table (‘telephone’) and the make (‘nokia’)

How do I do that.

UPDATE

RewriteEngine on
RewriteRule ^/([^/]+)/([^/]+) /index.php?table=$1&make=$2 [NC]

(in .htaccess)

$table = $_GET['table']; $make = $_GET['make'];
$CONsiteurl = mysql_query("SELECT * FROM $table WHERE name = $make");

So we can bring up the page now by typing in http://localhost/?make=nokia&table=telephones but cannot get to it by typing in http://localhost/telephones/nokia

Why

  • 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-05T19:44:13+00:00Added an answer on June 5, 2026 at 7:44 pm

    Assuming you have mod_rewrite setup you can put something like this in you .htaccess:

    RewriteEngine on
    RewriteRule ^/([^/]+)/([^/]+) /index.php?table=$1&make=$2 [NC]
    

    Then you can access the values from php using $_GET(‘table’) etc.

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

Sidebar

Related Questions

Is there any one know, what is the url rewrite rule in wikipedia article's
I need a rewrite rule that uses only one parameter. <rewrite url=~/(.+).aspx to=www.mysite.com/results?search=$1 />
Is there a way to make a rewrite rule to file located in a
I have a rewrite rule: RewriteRule ^b/([^/]*)$ bus.php?location=$1 When I try to login from
I need to return a url from a rewrite rule which contains either a
In my C#/.NET project I'm using the Rewrite URL module. There I have a
This is our rewrite rule: <rewrite url=/Product/(.+)/ to=~/ProductDetails?ProductID=$1 /> and it works fine for
I have a rewrite rule of the following form: RewriteRule ^foo/([a-zA-Z0-9]+)$ foo.php?arg=$1 [qsa,nc] It
if there is no index file in the folder how do i rewrite an
Further to my question at How do write a rewrite rule in IIS that

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.