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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:26:02+00:00 2026-06-07T02:26:02+00:00

I have various links on my site which are all generated via PHP MySQL

  • 0

I have various links on my site which are all generated via PHP MySQL queries.
So on one page, it may give a load of results, and if click one it may take me to:

…/sector.php?county=Kent

However I have a Rewrite Rule

RewriteEngine On
RewriteRule ^county/([^/]*)\.html$ /sector.php?county=$1 [L]

But still when I click on the link, I still see the above instead of :

http://sitename.co.uk/county/Kent

Am I doing something wrong?
This is the top of .htaccess file just in case it’s formatted wrong, everything else works. :

RewriteEngine On
RewriteRule ^county/([^/]*)\.html$ /sector.php?county=$1 [L]
AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /customers/6/c/d/sitename.co.uk/httpd.www/...
AuthGroupFile /dev/null 
<Files site.php>
require valid-user

… Obviously that’s not the whole thing, Just he structure.

Even if I manually directed to the new link …county/Kent i get a 404

  • 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-07T02:26:04+00:00Added an answer on June 7, 2026 at 2:26 am

    Mod_rewrite does not modify links that you output. It only modifies incoming requests from one url to another. How that url is interpreted is up to your application. It will be up to you to get you links output in the form of href=’/county/xxx’. Only you can answer how to do this at this point because it depends on how your application is coded.

    The reason you are getting a 404 when trying to go to /county/Keny is probably because you are including a .html in the match rule in your .htaccess file. Your first example rule doesn’t have it but the one in your sample .htaccess file does.

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

Sidebar

Related Questions

I have an iframe tab which holds php page with various links inside (like
I have searched various forums and links but havn't got anything helpful yet. Actually
I have various class which perform save and update operations of GUI elements, it
I have various pieces of generated HTML/JS that I load into Activity with WebView#loadDataWithBaseURL.
We have various related session variables for a complex page that has various things
I have various models of which I would like to keep track and collect
I have a site that shortens links based on Noah Hendrix's tutorial on the
I have an ASP.NET/C# application, part of which converts WWW links to mailto links
I have a multidimensional array with various sites links, here is output: Array (
Here's the use case: I'm building a site which will serve various global markets

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.