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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:44:15+00:00 2026-06-13T21:44:15+00:00

I have 2 pages in selecting data from mysql. First page – readmore.php, to

  • 0

I have 2 pages in selecting data from mysql. First page – readmore.php, to get posts with url from table posts. Second page – categories.php to get data with caturl from table categories.

readmore.php in .htaccess

    RewriteEngine On
    RewriteRule ^([a-zA-Z0-9-/]+).html$ readmore.php?url=$1
    RewriteRule ^([a-zA-Z0-9-/]+).html/$ readmore.php?url=$1

categories.php in .htaccess

    RewriteEngine On
    RewriteRule ^([a-zA-Z0-9-/]+).html$ categories.php?caturl=$1
    RewriteRule ^([a-zA-Z0-9-/]+).html/$ categories.php?caturl=$1

My problem located when get caturl htaccess redirects me to readmore.php but I want redirect to categories.php

  • 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-13T21:44:16+00:00Added an answer on June 13, 2026 at 9:44 pm

    You are redirecting *.html to a new url readmore.php?url=* therefor the url changes.
    Since the url is now readmore.php?url=* the second set of rules won’t fire (there is no longer a pattern that matches *.html).

    Therefor categories will never be loaded. You will need to add a parameter in your url to distinguish the different types.

    So make sure all your articles (or categories) have a common part in the url to indicate it is an page of that type.

    Example:

    RewriteRule ^article_([a-zA-Z0-9-/]+).html$ readmore.php?url=$1
    RewriteRule ^cat_([a-zA-Z0-9-/]+).html$ categories.php?caturl=$1
    

    So an article that was called article_firstpost.html would link to readmore.php?url=firstpost and cat_cars.html would link to categories.php?caturl=cars

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

Sidebar

Related Questions

I have created jquery-ajax call for php page that creates content by selecting data
I have a populated dropdown list from mysql on one page. What code should
I am selecting the following data from an SQL database table in my controller
I have a GridView using LinqDataSource to populate data from table Tickets . The
I have 2 pages that I want to show as instructions the first time
I have multiple pages branching of a title page, and when a back button
I have a php file which connects to a MySql db and read the
Everyone. I have a little issue with selecting value from the dropdown list. When
I have a this asp.net page which upon first time load: 1: Make a
I have some (php) code that performs critical updates on an InnoDB table. I'm

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.