If company
is the page slug try
'index.php?pagename=company&code=$matches[1]'
If you want it in .htaccess to intercept it before it goes to index.php try
'index.php?pagename=company&code=$1'
If company
is a folder, there should be an index.php (or whatever the default file name is for your server) inside it that will process code
.
Related Posts:
- PHP – redirect https to http and www to non-www
- 3 blogs same installation, without WP MU
- How to allow download url redirection only if user logged in WordPress site?
- redirect 301 with special character like WIX site “#!”
- 301 redirect from webpage to wordpress page in the same root
- 3 domains, 1 wordpress install, redirecting and changing domains on live site
- How to use multiple 404 Error Pages in WordPress
- How do I make a redirect in PHP?
- 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?
- Redirect to Page after Post Submit
- Bypass .htaccess when using download_url
- How to redirect users to custom lostpassword page?
- How can I run a .php file located in my site’s root folder?
- Fix 403 error on WordPress multisite network using subdomains
- How to redirect all 404 in a WordPress subdirectory to the index.php of subdirectory?
- How to turn off redirection from ‘domain.com/login’ to ‘domain.com/wp-login.php’
- Is Auto Post recognition a WordPress feature? How to turn it off?
- How to run multiple websites from single WordPress setup
- 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
- Logout and redirect using the WP Menu
- Change links automatically to affiliate links
- PHP If user is logged in & on home page redirect
- Change the actual (or viewable) WordPress directory structure
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Cannot get media type from ‘x-mapp-php5’
- Woocommerce redirect thankyou page based on product ID doesn’t empty Cart
- WordPress does not load page.php, return 404.php
- How to change home or site url using action hooks or filter?
- Apache Fallback instead of add_rewrite_rule
- Two Different Links for Same Product – WooCommerce [closed]
- Was told to change the .htacess file form .html to .php so this would work properly
- WordPress homepage infinite redirect
- Redirect undesirable domain
- how to combine wordpress htaccess on my root domain + php on subfolder
- subdirectory index.php is not working
- custom url rewrite for wordpress
- Loading index.php contents which located outside blog folder for post single page
- WP & Server Speed [Teacher Question]
- WordPress add_rewrite_rules for custom URLs ending in .html
- How to redirect users based on role and content of redirect_to?
- Showing latest post without 301 redirect
- Having Issue on Redirecting With Session in WordPress
- Troll the hackers by redirecting them
- WordPress redirect redirecting too many times or not at all
- I am receiving a pluggable.php warning sign on my only http:// page
- Login redirect. Check user meta and redirect accordingly
- Where to insert redirect code based on http_referer?
- Seo Friendly Filter URLs
- Is this a correct usage of ob_start() in my WordPress project?
- How to disable all logins except Network login in WordPress Multi site?
- PHP Redirect condition
- Removing files programmatically
- Manually Create PHP Page For A Redirect
- 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
- Redirect to current user page upon link click
- Ajax URLs without #!, how to prevent falling into single.php on load or reload?
- Writing a link cloaking plugin
- WordPress permalink issue
- WP insert post Redirect after function has executed
- How to redirect non logged in mobile users to page on same site?
- How to define a rule in functions.php that ONLY disables the default wp functionality that undesirably changes ‘&’ to ‘#038;’?
- Download file and redirect to page or vice versa
- How to serve WordPress folder over subdomain?
- WordPress url By country code?
- how can i redirect dynamic URL in worpress base on ID in htaccess or wp-config or function.php
- Implementing a multilingual WordPress site by installing several instances of WordPress and redirecting
- WordPress on Ubuntu – “File not Found” for home.php – Trying to Redirect to Root Folder
- Remove all feeds and return custom 404 page
- Rewrite rule not working, but only when parameter is text
- Internal Server Errors – Moving working multi-site install to my localhost
- Redirect User when they click Menu Option
- WordPress: Redirect Main Site to Subsite in Multisite Where user is NOT logged in
- Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- wp-login.php?redirect_to=https problem
- 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?
- ERR_TOO_MANY_REDIRECTS / To Force SSL Logins and SSL Admin Access
- .htaccess file doesn’t work, with hundred tries
- How to change query string with pretty URL in WordPress using .htaccess file
- Upload images from one server to an other in wordpress
- Override 404 when navigating to single php file
- Problem with ajax request and directory structure after site migration
- Submit to itself don’t work
- Resource 404 error on multisite subdirectory install
- Submitting my form to the database and then redirecting to payment site
- Redirect homepage /page/1/ to /blog/page/1/
- Enabling XSendFile causes 404 for images on WordPress Multisite / Network
- Redirect users not logged in to the standard login page (and back) from some posts and pages
- Link to external page has wordpress blog-url inside
- How to create a WordPress PAGE in another folder?
- index.php file keeps redirecting to a non-existent index.html file?
- Redirect loop upon installation of my plugin
- wp_login_url always redirects me to wp-admin