This fixed my issue.
function my_query_vars($vars)
{
$my_vars = array( 'PARAMETERS' );
return array_merge($my_vars, $vars);
}
add_filter('query_vars', 'my_query_vars');
function my_rewrite_rules($rules)
{
global $wp_rewrite;
$my_page="PAGESLUG";
$my_rule = array( 'URL/?' => 'index.php?pagename=" . $my_page . "&school_type=$matches[1]' );
return array_merge($my_rule, $rules);
}
add_filter('page_rewrite_rules', 'my_rewrite_rules');
Related Posts:
- Rewrite /keyword1+keyword2.html to search page | .htaccess
- how to combine wordpress htaccess on my root domain + php on subfolder
- custom url rewrite for wordpress
- NGINX rewrite rules for WordPress Subdirectory Multisite to support deep URL
- Chrome net::ERR_INCOMPLETE_CHUNKED_ENCODING error
- Redirect vs RedirectMatch
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- How to remove index.php from WordPress site URL
- Redirect old php link to wordpress link in .htaccess
- Redirect old php link to wordpress link in .htaccess
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- How to create custom 401, 403 and 500 error pages?
- cURL 28 error after switch from to brew php 7.2 on localhost
- PHP – redirect https to http and www to non-www
- How to run multiple Async HTTP requests in WordPress?
- WP CLI info showing correct PHP binary but wrong version of PHP
- Does the debug.log do log rotation?
- Rewrite /?rest_route=/ link to /wp-json/ without changing default permalink structure in apache
- Bypass .htaccess when using download_url
- How can I run a .php file located in my site’s root folder?
- Fix 403 error on WordPress multisite network using subdomains
- Can I write ‘RewriteCond’ using ‘functions.php’?
- How to redirect all 404 in a WordPress subdirectory to the index.php of subdirectory?
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- WordPress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error [duplicate]
- How to run multiple websites from single WordPress setup
- Does WP Have a Function To Generate .htaccess RewriteCond?
- Using PHP in a Stylesheet (possibly a “.htaccess” problem?)
- How to override .htaccess with new rules without ftp or edit it manual
- WordPress-site can be reached on x.x.x.x/index.php – but not directly on the IP without index.php
- WordPress Rewrite API calls not creating new rules
- apache cpu over 70% on localhost
- Is it possible to move wordpress out of webroot?
- Newbie question: no index.php? in my plain wordpress permalink
- login wp impossible
- wp-admin/index.php gives a “500 Internal Server Error [closed]
- Memory errors with media upload, WordPress can’t use more than 96M (while there’s 512 available!)
- Change the actual (or viewable) WordPress directory structure
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Evaluations of two wordpress security plans against php code injection attack
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- Cannot get media type from ‘x-mapp-php5’
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- How to rewrite URL with PHP variables with htaccess to a normal looking URL?
- Is XAMPP faster than running LAMP in WSL on Windows 10? [closed]
- Static variable and add_rewrite_rule?
- Apache /Ubuntu server not running WordPress installation, outputting PHP code like HTML
- How to change home or site url using action hooks or filter?
- Performance impact of rewriting WordPress URLs
- 3 blogs same installation, without WP MU
- Two Different Links for Same Product – WooCommerce [closed]
- WordPress: get recent posts, delete the current category
- Was told to change the .htacess file form .html to .php so this would work properly
- PHP Warning: chmod(): Operation not permitted in class-wp-filesystem-direct.php on line 173
- Changes in permalink structure in WordPress and how to apply to in-site links
- WordPress Persistent connection rule does not work for “posts”
- How to change redirection route to a php page for making it only accessible by logged-in members?
- WordPress admin dashboard missing icons
- WordPress returning 404 for multisite pages
- Append query string to all URL’s
- custom rewrite rule help! Custom rewrite rules not applying to custom post type
- subdirectory index.php is not working
- How to disable server signature on wordpress? [closed]
- Posting and image insertion problems after EasyApache4 and PHP 7 upgrade
- Loading index.php contents which located outside blog folder for post single page
- Create custom permalinks to show Custom Post Type’s relationship?
- WP & Server Speed [Teacher Question]
- Redirect to another page using contact form 7? [closed]
- WordPress add_rewrite_rules for custom URLs ending in .html
- Call to undefined function mysql_connect() After upgrading PHP 7.1 to 7.3
- How does WP work in conjunction with a web server?
- Troll the hackers by redirecting them
- Rewrite with pagination /foo/page/2/ to posts of a given category, page 2
- How to override url params with rewrite rules vars?
- Seo Friendly Filter URLs
- Permalinks are not working in WordPress in digitalocean
- How to allow download url redirection only if user logged in WordPress site?
- How to disable all logins except Network login in WordPress Multi site?
- Using rules in Posts
- Removing files programmatically
- Apache HTTP Server stops working for only a certain local website
- Is it possible to restrict files from your wordpress uploads (not logged-in users or guest)?
- Simple seo-friendly custom $_GET url rewrite with htaccess
- WordPress Rewrite Rule
- Problem with data collection in tables
- Prevent Buddypress Rewrite Rules on Non-Buddypress pages/posts
- Change permalink structure specific category
- How to make Subdomain work for product_tag?
- How to serve WordPress folder over subdomain?
- Pages from admin dasboard missing after site migration
- Rewrite rule not working, but only when parameter is text
- Internal Server Errors – Moving working multi-site install to my localhost
- Rewrite rule for wp
- How to edit content in WordPress and the Polylang – plugin? – with demosite
- Upgrade to PHP7.3 and Changing Apache from Prefork to Event Breaks WordPress
- Windows Setup: Error establishing a database connection
- Huge time to first byte on live site
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- WAMP SERVER Command Prompt SET PATH=%PATH%