Just remove pagename=event& and reset your rewrite rules…
$newRule = array('event/(.+)' => 'index.php?eventid='.$wp_rewrite->preg_index(1));
*template_include* is a filter NOT an action!
add_filter('template_include', array($EventpageCode, 'template_redirect_intercept'));
You can use *wp_title* function or filter to modify your page title.
Related Posts:
- Why is there /index.php/ in all my links? How do I remove it?
- Add .html extension to only one page in my WordPress site
- open all .docs in word online
- How to create a front end user profile with a friendly permalink and a 404 trigger
- Attachment page gives 404 if user not logged
- Using a custom 410 page
- Why when I enter bad url wordpress doesn’t return error 404
- 404 redirect based on url
- Thousands of 404 errors on old posts due to embedded links
- How do I get posts to appear at mydomain.com/blog?
- Page not found: Custom search form with a custom search page
- Show index.php template instead of 404 page template
- Redirect empty search to another page
- Custom taxonomy named ‘tag’ return 404 page
- Why is there a 404 on page 2+ for my search page?
- Param causing 404
- Error 404 wordpress redirecting URL
- add_rewrite_rule is not fired
- Stop wordpress to redirecting home page if no page found
- How can i maintain permalink structure and avoid a 404 error when loading external content?
- 404 for index.php
- How to disable WordPress canonical redirect to nearest matching URL and force 404 Page?
- Use a template file for a specific url without creating a page
- Using the Rewrite API to Construct a RESTful URL
- Adding rewrite endpoint breaks static front page
- Rewrite Rules for Multiple (more than 2) Taxonomies
- How to add dot(“.”) in post slug
- add_rewrite_rule not loading correct page nor getting variables
- Add language/country code to each possible URL
- SEO Friendly URLs for my plugin categories
- How to create a specific frontend URL (not a Page) from a theme or plugin?
- WordPress URL rewrite regex
- WordPress keeps writing rewrite rules to .htaccess
- WordPress Rewrite
- Removing CPT slug from URL results in 404 error for archive page
- custom template for custom url
- page is not redirecting
- Multilingual theme: Changing locale based on URL
- Allow single quote in URLs
- How to have multiple rewrite endpoints in the same URL?
- add_rewrite_rule is not taking effect in WordPress? .htaccess file doesn’t update
- Remove all categories from URL
- change default ‘post’ slug with register_post_type_args
- Add specific word to default page permalink
- Permalink Rewrite for Custom Taxonomy
- Is it possible to generate an alternate structure for multi-tag urls?
- Use single-site install and map entities to subdomains
- Rewrite rule to load images from production does nothing
- WordPress SSL (https) is not working with custom permalink
- Creating a dynamic URL structure
- How to define a callback for an URI?
- NextGEN Gallery Lightbox – Social Share URL Redirect
- Rewrite Preview URL to include index.php
- How to disable URL rewriting for specific URLs?
- How can I dynamically generate an image with a static image URL?
- Rewrite wp-login.php URLS to static pages?
- How to access custom pages
- Rewrite custom post type URL parameters
- How to remove wordpress directory slash
- Changed pagination URLS to use p= instead of paged=
- React Router with WordPress
- joomla to wordpress migration and 404 errors issues [closed]
- How do I only allow downloads that are referred from my domain?
- URLs with two taxonomies are missing from sitemap
- URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”
- URL Rewrite and add_query_var not working
- Rewrite permalink for specific posts
- How do I redirect a post url to a custom url?
- 404 Error on form submission within custom post type
- Retrieve query var within functions.php
- rewrite rule generated with mpdf to a shorter version
- Name page template properly
- Show Mysql table elements as pages in WordPress
- WP in subfolder hidden by htaccess, but media links show the subfolder
- One off rewrite for single post-type slug (show normal page with same URL instead)
- .htm re-write is adding an ending / to my URL bar
- Import images from self-hosted to WordPress.com
- modify URL with mod_rewrite or hook
- Help with WordPress custom url rewriting?
- Query vars to return the homepage
- dynamic URL rewrite
- Rewrite rule can’t get the ID from rewrited
- How wordpress core include search.php with $_GET[‘s’]?
- Dynamic Content w/ geolocation in WP?
- url redirect none www to www
- How to remove Base URL Duplication?
- WordPress doesn’t remember my custom rewrite rule
- Custom urls in WordPress involving page slugs
- Why do my offline development site and online live site behave differently?
- how to change some of the rules in the database
- Rewriting URLs with query strings and preserving them
- how rewrite is working in wordpress
- How to prevent URL-modification when page title contains digits only?
- How do I display a friendly URL link in the frontend?
- rewriting an Url
- Google not index my Custom 404 page ?why?
- Please give me the rewrite rules for my ugly urls
- Spurious URL structure (Adding extra /0/s)
- Programmatically add a custom url route “/category/index.json” to return a collection of posts in json
- WP-Include rewrite directory