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

  • Home
  • SEARCH
  • 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 8211209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:21:09+00:00 2026-06-07T10:21:09+00:00

I am trying to integrate a few non-wordpress PHP pages into an existing WordPress

  • 0

I am trying to integrate a few non-wordpress PHP pages into an existing WordPress site. Ideally, I want to rewrite anything request that looks like this: ‘domain.com/books/bookname’ to ‘domain.com/catalog.php?title=bookname’. I have been messing around with the WP Rewrite API for several hours, but I just can’t get anything to work. Here is my current plugin code:

register_activation_hook( __FILE__, 'wbm_catalog_activate' );
function wbm_catalog_activate() {
    wbm_catalog_add_rules();
    flush_rewrite_rules();
}

// Flush when deactivated
register_deactivation_hook( __FILE__, 'wbm_catalog_deactivate' );
function wbm_catalog_deactivate() {
    flush_rewrite_rules();
}

add_action( 'init', 'wbm_catalog_add_rules' );
function wbm_catalog_add_rules() {
    add_rewrite_rule( 'books/([^/]+)/?',
        'catalog.php?title=$matches[1]', 'top' );
}

I can even inspect the $wp_rewrite object and see my new rule added, but whenever I try to visit a rewritten url, wordpress acts as though the rule were not there.

I have been banging my head up against a brick wall, and I would appreciate any help you could give!

  • 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-07T10:21:11+00:00Added an answer on June 7, 2026 at 10:21 am

    I was unable to ever resolve this issue. The site that I was working on was part of an old WordPressMU setup (2.8) with a number of sites. I did not have access to the .htaccess that the MU install was using, and it was not passing any requests through to the .htaccess file that I could edit.

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

Sidebar

Related Questions

I am trying to integrate a simple login for my site with php. i
So, I've been trying to visually integrate my Wordpress site and PunBB forum for
I've spent MONTHS trying to integrate PayPal into my site, followed countless tutorials, articles
I'm trying to integrate passport into my nodejs server using connect, but can't seem
I am currently trying to integrate Paypal's MECL in an already existing IOS project
Hi I'm trying to integrate an LDAP search functionality into my app similar to
I'm trying to integrate FNV hashing algorithm on a PHP-based project as part of
I am trying to integrate a tumblr blog into a website. I have tried
I m Trying to integrate a spellchecker library into my application...can anyone suggest me
I've been trying for a few days to integrate Google Calendar in my Android

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.