Rewrite rules modify a web URL's appearance. This modification is called URL rewriting. Rewritten URLs (sometimes known as short, fancy URLs, search engine friendly - SEF URLs, or slugs) are used to provide shorter and more relevant-looking links to web pages. The technique adds a layer of ...

learn more… | top users | synonyms

0
votes
1answer
16 views

Wordpress rewrite rules not working

I have created a plugin and i have gotten rewrite rules to work using my .htaccess file. I would like to make this work from my plugin instead to keep everything contained from within there. Im ...
1
vote
0answers
6 views

Wordpress Deadlock Error

I see more of this error these days in error_log. I see that someone asked this question here a year ago but no solution. Please advise what is causing this issue. Already, tried deactivating some ...
0
votes
0answers
8 views

What to do after a wrong RewriteRule?

I have A Wordpress MU and following this answer I changed my root .htaccess placing this before the Wordpress loop RewriteRule / /subfolder [R=301,L] trying to have a different homepage. It didn't ...
0
votes
0answers
22 views

Have a WordPress page with same title as custom post type “front” slug

I have a custom post type djs and a custom taxonomy city with two terms: boston and nyc. So a DJ can either be tagged as Boston or NYC. DJ profiles (a single djs post) are located at ...
1
vote
0answers
16 views

Rewrite rule for page with plugin shortcode

I created a plugin to display a list of real estate properties on a page. The list is embedded into a custom page as a shortcode: [real_estate_list status="1"] The list is loaded from an external ...
-1
votes
0answers
14 views

Rewrite Rules for Custom Post Type Taxonomy Archive by Date

I am looking t this page here and it works pretty well for standard taxonomy archive rewrites and custom post type date archives. Archive page for custom taxonomy grouped by month How would I make ...
0
votes
1answer
10 views

Rewrite rules ignored

Why are my rewrite rules being ignored by WordPress? I've got the following rule added: news/([0-9]{4})/?$ archive-news.php?year=$matches[1] but the URL news/2015 gives a 404. Why?
0
votes
0answers
5 views

Rewrite Rules and Archives

I have a URL that looks like this http://localhost/mysite/publications/2015/ and using the Rewrite Rules Inspector plugin released by WordPress I get the following 2 matches for that URL: ...
0
votes
1answer
17 views

Pagination for custom post types - url rewriting

I'm working with custom post type, that I want to paginate, here's part of code, initializing custom post type: $args = array( 'labels' => $labels, 'public' ...
1
vote
1answer
188 views

Regionalised Content

Ok, so - I am working on a magazine style website that requires "regionalised" content. So for example I have: UK (Includes ALL) Manchester Brighton London I have already successfully ...
0
votes
1answer
19 views

Custom Query & Rewritten URL Pagination 404

I have a custom search results page that has the url "/mysearch/location/SUBMITTED DATA/" which works perfectly fine. However I'm now trying to get my pagination working on that page so the URL will ...
0
votes
1answer
24 views

Rewritten URL not loading WordPress environment

I have a page that I am sending users directly to so I can serve them a PDF dynamically created using the FPDF library. Since I'm sending them directly to the file which generates the PDF, I'm ...
0
votes
1answer
21 views

Wordpress Prevent 404 on missing custom post

The thing I am trying to achieve is to get data from a third party data source and display each piece of information as if it was a "post" in a WP theme. Now, the WP theme intrinsically works with ...
0
votes
0answers
20 views

CPT Rewrite Rules by date

I'm having issues with date categorized posts for my CPT. I have permalinks not on the default. I created a CPT with register_post_type and setup rewrite rule as follows. 'rewrite' => array( ...
0
votes
1answer
32 views

htaccess doesn't cache my latest news when logout

To speed up my website i'm using w3 total cache and some htaccess . . . it works just amazingly ! Otherwise, big problem, I have on my homepage the latest news being display, when I'm login, it ...
0
votes
0answers
18 views

Stop WordPress from redirecting ?p= in custom rewrite rule to slug of page

I've written a custom rewrite rule, which should rewrite a specific case of a taxonomy url to serve a page. The rule is as follows: add_rewrite_tag('%tax_slug%', '([^&]+)'); ...
2
votes
1answer
22 views

Single Redirection Rule for Pages and Archive links

I am trying to find pretty URL solution for url parameters. Consider this url set http://example.com?token=foo http://example.com/pagename?token=foo http://example.com/parent/childpage?token=foo ...
0
votes
0answers
12 views

URL Structure for Custom Page Type with Custom Taxonomy

There are a number of questions here that are similar to what I'm trying to do, but none seem to answer what I'm looking for. I have a custom post type with a rewrite like: 'rewrite' => array( ...
0
votes
1answer
21 views

Custom taxonomy Rewrite Rule

I want my taxonomy url to be like this: site.com/page/taxonomy_term How will I be able to achieve this? I have written a wordpress rewrite rule code in my functions.php like this: function ...
0
votes
0answers
18 views

Added incorrect rewrite rule now getting an error

I have made a mistake using add_rewrite_rule() function and now my site is throwing a 500 "internal server error" normally I would just edit/fix the issue in my .htaccess but since this is not how ...
0
votes
0answers
7 views

WordPress Rewrite/Query Var .. ignore a word?

I have created an 'event listing' area on my WP website, it uses rewriting and a query var to dynamically load the event 'slug' as a variable so that I can add pages on the fly. However it has broken ...
0
votes
2answers
28 views

add_rewrite_rule isnt working, not getting added to rules array, why?

I'm trying to add a new rewrite rule but it doesn't seem to be getting added to the array and it certainly isn't working. I'm trying to get this URL, dult.dev/lists/games/destiny, to take me from a ...
0
votes
0answers
27 views

How can I map a specific URL pattern to a plugin for processing

I want to send traffic of a specific URL pattern to be processed by my plugin. Based on that pattern, I will pull some custom post type information from WP, gather external info via JSON, aggregate ...
0
votes
0answers
13 views

add_rewrite_rule working for posts but not for pagination

I have used add_rewrite_rule to change my urls please check the code below. add_rewrite_rule( '(.+?)/([^/]+)/?$', 'index.php?category_name=$matches[1]&name=$matches[2]&is_play=1', ...
0
votes
1answer
27 views

Capturing /page-name/[0-99999] in both template and number

Apologies if this has been answered already - I have singularly failed to word my question in a way that Google can help. I'm trying to create a page that acts as a base URL for a range of items with ...
0
votes
2answers
56 views

Custom Rewrite with Query vars

I have been stuck on this for hours and tried all these different methods but none seem to work. I've seen other threads with a similar problem but the solutions are not working for me. I'm hoping ...
0
votes
0answers
25 views

WordPress render's 404 for known rewrite rule

I have defined rewrite rule for my hieratical custom post type. remove_filter('template_redirect', 'redirect_canonical'); function add_artists_query_vars($aVars) { $aVars[] = "work_index"; ...
13
votes
1answer
319 views

How to reliably flush rewrite rules on multisite?

Let's say you have a plugin which need to flush rewrite rules. You do it all properly with activation hook and adding flush late, so everything is smooth and compatible. And then one fine day someone ...
0
votes
0answers
31 views

URL Rewrite Rules & Get Method

I have three dropdowns on my blog which allows you to filter by custom taxonomies. I'm using the following function to create the dropdowns: function get_terms_dropdown_risk_category($taxonomies, ...
0
votes
0answers
31 views

Get custom pretty-permalinks working with 3rd party API querystrings?

Edited to remove any reference to 3rd party API stuff: I have /%category%/%title%/ as my permalink structure. I have a page which uses a couple of querystring variables: ...
2
votes
1answer
122 views

How to add rewrite rules and pagination to retrieve attachments files?

I'm trying to list attachments based on different taxonomies. Right now it only work for the basic url (no pagination added). For example ...
0
votes
0answers
31 views

Changing default slug of post to the post id

Is it possible to change the default slug from the post title to a number? For example, the current url to a blog post would be: baseurl/blog/the-title-of-the-post Lets say the id of the post is ...
0
votes
0answers
14 views

WP Rewrite - some rewrite rules are ignored and instead a redirect is served

I am trying to allow any URI that's prefixed with pf/ to show a page without redirection. I do this by filtering rewrite_rules_array and simply duplicating the rules with a pf/ prefix public function ...
1
vote
1answer
43 views

How to building pretty URLs to reflect category hierarchy?

At the moment, this is how I access brands (custom post type) on my page: http://example.com/<base>/<brand> I would like to access brands like this: ...
0
votes
0answers
25 views

Wordpress add_rewrite_rule with priority

I'm working on a Wordpress website which shows companies in a city. The URL's are like www.address.com/new-york/. I've created a rewrite rule for this and it works but now i'm not able to visit any ...
0
votes
1answer
51 views

How to change the displayed URL?

I'd like URLs like this: http://example.com/root/branch/twig/ be rewritten and displayed to a URL like the one below: http://example.com/root/twig/ At the moment, the two URLs point to the same ...
1
vote
1answer
52 views

How to check if a rewrite rule exists

A common problem with rewrite rules added in a theme is that there is no obvious hook on which you can flush the rewrite rules. The problem is getting harder when you update a theme with new code that ...
0
votes
0answers
19 views

Need help with rewrite for an archive page under a specific category

I have two CPTs, cartoon-series and episodes. I have one taxonomy, cartoon-series which is used to link the two CPTs together (long story - other threads for a complex issue). I have rewrites that ...
0
votes
1answer
39 views

Need help with complex custom post type setup

I have three custom post types: cartoon-series, episodes, and special-features. Right now I have cartoon-series posts set to be post-parents of episodes and special-features posts. That's the only ...
0
votes
1answer
43 views

Custom Post Type won't Register

I'm hoping one of you WP gurus can spot what I am missing. I have a CPT that won't register for some reason. It' virtually identical to another CPT that is registered just fine. I have a custom post ...
0
votes
0answers
52 views

Pass tax_query variables in URL

I'm trying to create some URLs rewrite for my site, but now I'm stuck. I have this structure in my permalinks: example.com/%custom-type%/%category%/%postname% The full URL is already working: ...
0
votes
0answers
21 views

Rewrite for custom type and custom taxonomy

Hello I created a custom post type using the Types Plugin, this custom type has the slug menu, and my permalink structure looks like that: example.com/%custom-type%/%category%/%postname% ...
-1
votes
3answers
208 views

WP Job Manger change jobs url (NOT slug)

I'm using the WP Job Manager plugin in my wordpress website. The list of my jobs is currently found on /jobs . I would like to have it on /careers . The listing of all jobs is not a page so I can't ...
0
votes
0answers
19 views

Custom rewrite rule returns post instead of (start)page

I need a custom rewrite rule so that /a/b/c/d/123 points to the startpage because my own plugin on the startpage needs those parameters from the URL. / I was able to accomplish most of ...
0
votes
1answer
78 views

Nginx rewrite rule conflict with WordPress permalinks rule

Facing issue with nginx url rewrite rules. What I want is to serve http://example.com/2015/03/23/post-title/ page when someone tries to access http://example.com/2015/03/23/myfeed/post-title/ url. And ...
0
votes
0answers
18 views

Rewriting top level URL to point to custom taxonomy in addition to pages and categories

I need the top level URL on a blog to point to custom taxonomy, in addition to categories and pages which are the default. For example, currently if a visitor goes to example.com/entertainment, ...
0
votes
0answers
61 views

URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”

I have created a custom user meta = shop_name in User Profile and custom post type gallery The default URL of the post is http://localhost/gallery/%gallery% which i have modified to below given URL ...
3
votes
1answer
41 views

Change page /2 to /transcript with a Rewrite

I set up this rule (in functions.php) function custom_rewrite_basic() { add_rewrite_rule( 'episode/([^/]+)/transcript', ...
0
votes
1answer
79 views

Wordpress Custom post type single page 404 error

I have a wordpress website where I am using custom post types. I have an error on all single custom post type pages of one of the custom post type called products registered as portfolio. If I refresh ...
0
votes
1answer
36 views

Using category slug in add_rewrite rule

I'm using this function ro rewrite URLs: function archive_rewrite_rules(){ add_rewrite_rule( 'inspiracao/([^/]*)/([0-9]{4})/?$', ...