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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:15:37+00:00 2026-05-30T05:15:37+00:00

I wonder if you can help me with a problem I am having, and

  • 0

I wonder if you can help me with a problem I am having, and give some advice on best practices.

I have a mysql table as follows

teams

columns: id, name, description
data : 1, Aston Villa, text here

I need to do dynamic rewrites to pull out data from the table. The only way I could think to do this was to use _GET as a variable and and look up the name, and change the case to lower case and swap spaces for -. I know there are a few security issues around doing it this way, but its a nice looking url http://www.mydomain.com/clubs/aston-villa

I have been looking at some frameworks such as yii and they seem to do it php side as apose to in the htaccess file.

Could anyone give me some pointers on the best way to achieve this, I havent managed to find any decent info on the web about best ways to achieve this.

Thanks in advance

Richard

  • 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-30T05:15:39+00:00Added an answer on May 30, 2026 at 5:15 am

    The best solution is to redirect all request to a single file (this is called bootstrapping). The redirect is done in .htaccess like so

    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
    
        # Rewrite all other URLs to index.php/URL
        RewriteRule ^(.*)$ index.php/$1 [PT,L]
    
    </IfModule>
    

    Then, in index.php parse the request url, for example, via the $_SERVER values.

    Even better, just google PHP bootstrap and get one of the very simple functioning samples/demos

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

Sidebar

Related Questions

I wonder if anyone can help with a jQuery problem I am having. I
Wonder if anyone can help me with this problem. I have created a Window
I wonder if anybody can help with a problem I'm having with MS Outlook
wonder whether someone can help me with the following one... I have a struct
I wonder if anyone can help - I have this error showing recently when
I wonder if someone can help shed some light on this: I drop a
I wonder whether someone can help me please. I have the following xml file
I wonder if someone here can help me figure out this problem. I need
I wonder is anyone can help me with this annoying problem. Trying to insert
I wonder if someone can help me with this. I have a LINQ query

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.