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
- 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 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?
- 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
- Does WP Have a Function To Generate .htaccess RewriteCond?
- How to override .htaccess with new rules without ftp or edit it manual
- WordPress Rewrite API calls not creating new rules
- apache cpu over 70% on localhost
- 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
- 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
- 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
- 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
- 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
- Prevent Buddypress Rewrite Rules on Non-Buddypress pages/posts
- Change permalink structure specific category
- 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
- Windows Setup: Error establishing a database connection
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- WAMP SERVER Command Prompt SET PATH=%PATH%
- How come there is no error if I upgrade WordPress core after locking .htaccess permissions to 644?
- How to block access to a folder inside of wp-content for non logged in users?
- How to change query string with pretty URL in WordPress using .htaccess file
- Upload images from one server to an other in wordpress
- 403 Forbidden Localhost Wamp Apache Php
- Problem with ajax request and directory structure after site migration
- Strange special character/Latin characters
- add_rewrite_rule questions
- rewrite_rule – working fine but broken for pagination
- What to do after a wrong RewriteRule?
- Redirect homepage /page/1/ to /blog/page/1/
- Not logged in when using http
- Blog only showing code
- Enabling XSendFile causes 404 for images on WordPress Multisite / Network
- 3 domains, 1 wordpress install, redirecting and changing domains on live site
- WordPress Memory limit not increasing
- how to put shortcode to the top of the page – theme 2014
- How to avoid timeout waiting for output from CGI script?
- How can I prevent wordpress from sending emails
- How to use multiple 404 Error Pages in WordPress
- WordPress add parameters with friendly url structure
- Increase Upload Size with htaccess | MAMP
- WP-Include rewrite directory
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico
- Restricting access to a file for everyone except logged in users