You could use a WordPress rewrite (as opposed to mod-rewrite) to solve the issue.
function createRewriteRules( $rules ){
$newrules = null;
$newrules = array();
$newrules["catalog/?$"] = "index.php?page=xx";
$rules = $newrules + $rules;
return $rules;
}
add_action('rewrite_rules_array', 'createRewriteRules');
You’ll need to flush the rules:
http://codex.wordpress.org/Function_Reference/flush_rewrite_rules
Your page-catalog.php file could then sniff the original url and do some processing as required.
Related Posts:
- Param causing 404
- Use a template file for a specific url without creating a page
- Does WordPress keep track of a post’s URL history and provide automatic redirects?
- Using custom/dynamic “slug” for a page
- Custom slug in front of search URL
- Display posts with author in the url with custom post types
- Clash of the rewrites
- Will references to ugly links automatically redirect to their pretty url permalink?
- How to create a specific frontend URL (not a Page) from a theme or plugin?
- Appending numbers to url do not break the link
- Hijacking the URL for filtering
- custom htaccess rewrite rule for page
- Tricky URL rewrite with custom values in url
- How to change page URLs to “www.site.com/page” instead of “example.com/blog/page” but keep post URLs as “example.com/blog/post”?
- Add_query_arg + two times the same argument?
- WordPress 404 unless there is a space in url
- Why is there /index.php/ in all my links? How do I remove it?
- Taking a value from PHP_URL_PATH won’t work after WordPress 5.5 update
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- redirect 301 old url to new url
- Add a query string to ALL links on site
- Add rewrite rule for rewrite endpoint
- Migrating a page to be an article
- Allow single quote in URLs
- How to get “extended” path info from URL in a plugin
- How to perform a query at the URL?
- Is there a way to create alias without using htacess, permalinks or delving into code?
- Define orderby in url
- Is there a ‘rake routes’ for wordpress?
- Changing RSS feed URL structure
- Creating a dynamic URL structure
- Critical error in final stage of website launch – URLs are BROKEN!
- add_rewrite_rule fro html to another url not working
- Preserve Domain Alias
- WordPress redirects non-existing url to existing ones – how to disable
- How to rewrite url wordpress?
- How to disable URL rewriting for specific URLs?
- How to building pretty URLs to reflect category hierarchy?
- Adding special characters to slug?
- How do I display only the parent page in the url
- Rewrite custom post type URL parameters
- Translate custom post type and taxonomy slug in URL?
- A clean custom rewrite rule for weekly archives
- I want to add a new tag to WordPress URL permastruct
- Add language prefix to permalinks
- Why is WordPress rewriting absolute URLs on staging site to include staging prefix when we manually point them at the live site?
- React Router with WordPress
- Attachment page gives 404 if user not logged
- How to change the Author Slug from Username to Nickname and deal with Special Characters
- Per Page Permalink Structure for Page Post Type
- Rewrite /category/cars into /topics/cars
- URL renaming issue
- Removing “www” from a site URL
- Adding a query string to only one page url
- custom wordpress rewrite
- Why when I enter bad url wordpress doesn’t return error 404
- Weird characters behind every single link and images
- How to use wp rewrite to hide form action url?
- Thousands of 404 errors on old posts due to embedded links
- database not responding on localhost
- How do I get posts to appear at mydomain.com/blog?
- Adding Theme File for Non-WordPress Content
- remove archive from url :: marketpress
- Make the home page’s slug visible in the browser’s URL bar
- Show index.php template instead of 404 page template
- add_rewrite_rule with optional parameters
- How to change search page url so that it still returns a page when there’s no search query specified?
- Append a parametter at first or last to a certain URL
- Allowing multiple URLs for same Post
- How to create dynamic URLs on WordPress?
- Redirect empty search to another page
- Dynamic URL with rewrite rule not working
- Custom taxonomy named ‘tag’ return 404 page
- How to Update / Change URL when Popup Modal Loads?
- Multiple permalink with and without category for same post
- Passing a variable to hyperlink text?
- url redirect none www to www
- Root-relative paths being rewritten on ‘Edit Page’ [closed]
- How to remove Base URL Duplication?
- Get custom posts by segment of the URL
- Get parameters and custom page template
- Direct Dynamic URL in root to a location within template
- Use Parent Pages for URL Structure without Landing Page
- taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
- Error 404 wordpress redirecting URL
- Remove Page Slug from URL
- How to create short urls for sharing and downloadable content?
- add_rewrite_rule is not fired
- How to stop WordPress creating URLs that don’t exist
- Get content from other database table based on an ID and rewrite URL
- Stop wordpress to redirecting home page if no page found
- Rename page URL
- How to prevent URL-modification when page title contains digits only?
- How to exclude my home page from url of my internal pages?
- How do I display a friendly URL link in the frontend?
- Please give me the rewrite rules for my ugly urls
- Lost WordPress website access after changing URL [closed]
- Spurious URL structure (Adding extra /0/s)
- WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?
- How to disable WordPress canonical redirect to nearest matching URL and force 404 Page?