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

4
votes
1answer
84 views
+100

permalink independent on the post's name stored in the database

I'm trying to make a custom permalink structure for my posts. www.example.com / post / %post_id% / %posttitle% / In this permalink, the post's ID comes first, then the post's title after it. ...
0
votes
1answer
14 views

Rewrite Rule added but showing 404 rather than specified page

I have the following rewrite rule function coaching_apply_rule() { add_rewrite_rule('^coaching/apply/', 'index.php?page_id=5156', 'top'); } add_action('init', 'coaching_apply_rule'); Reason for ...
0
votes
0answers
16 views

Intermittent 404 errors, rewrite rules, and BBPress

I am trying to debug an intermittent 404 issue that may be related to BBPress. I’ve read several other reports about intermittent 404s and BBPress, but none of them are exactly applicable to my ...
1
vote
1answer
23 views

Remove base slug in CPT & CT, use CT in permalink

I've come quite far, but can't manage to get this to work. I'd like to remove the base slug from my Custom Post Type review and my Custom Taxonomy brand. The final result should be a URL like this: ...
0
votes
0answers
21 views

Update broke rewrite rule

With the update from 4.4 to 4.4.1 somehow suddenly my rewrites aren't working anymore. I've written a plugin to show attachments on a page (the landing page specifically) so people that come to the ...
0
votes
0answers
10 views

rewrite rule stopped working

I have added a custom rewrite rule + custom query var <?php add_filter('query_vars', 'add_query_vars'); function add_query_vars($aVars) { $aVars[] = "activePage"; return $aVars; } ...
3
votes
1answer
18 views

Cyrillic characters in rewrite rules cause 404 Not Found errors

I have a rewrite rule that includes a page's URI: (<page-uri>)/someaction/(\d+) If the page's URI includes cyrillic characters, such as доска-объявлений, the rule is stored as: ...
0
votes
0answers
35 views

Canonical url differs from custom post type archive URLs

I cannot figure out how to control canonical URL for custom post type archive pages. Here's my excerpt of CPT setting for soccer_club for example. This CPT supports default category taxonomy. $args ...
0
votes
0answers
10 views

Any way to make Apache's internal redirect work?

What I really want to do is to make URLs like http://localhost/bmicalc/bmi24.57 to redirect to http://localhost/bmicalc/index.php?pagename=bmi&result=24.57 without changing the URL in the ...
0
votes
1answer
51 views

Custom rewrite rule for hierarchical custom post type

Working on a client site I've encounter my worst enemy... WP URL rewrite :(. I actually can't figure it out and after many days trying and searching, I can't make it work. What I'm trying to get is ...
1
vote
2answers
56 views

Permalinks: Page Not Found

When I open the newly created page in WordPress I get page not found but when I reset the permalinks to none http://localhost/?page_id=6 opens normally . Even with this permalink it works : ...
0
votes
1answer
23 views

How can I reduce the number of rewrite rules?

I'm building a robust filtering system for my WordPress site, and I really want to have pretty permalinks for the resulting URLs. But because I'm offering a large amount of different filtering ...
0
votes
0answers
16 views

Permalink structure between 2 custom post types and a taxonomy

Ok here is the scenario. I have a custom post type called "Communities", a custom post type called "Community Posts" and a taxonomy under "Community Posts" called "Communities". The idea here is that ...
1
vote
1answer
78 views

Parent & Child Taxonomy slugs in custom post permalink

I've registered a custom post type "book" and a taxonomy "authors" as below: add_action( 'init', 'post_book_init' ); function post_book_init() { $labels = array( 'name' ...
0
votes
0answers
40 views

Permalink structure not working with Custom Taxonomy (URL like ./taxonomy/category/postname)

I want to publish and organize issues with WordPress. The magazine is structured into issues (for example Magazine n°23), categories (always the same categories regardless the issue) and finally ...
0
votes
0answers
33 views

Custom permalinks for search with extra parameters

I am trying to change default WordPress permalinks for search because I added few parameters to search.php the url now is like: ...
0
votes
0answers
16 views

RewriteRule to hide Wordpress folder from URL in some cases. How to?

I'm trying to obtain hide wp-content folder from url in this way, to make it easy for visitors: permalink: mysite.com/wp/this-page-en required address: mysite.com/en/this-page The www folder ...
1
vote
1answer
19 views

Does it still make sense using json endpoint ep_mask now that there's the new rest api? [closed]

I was wondering... Maybe I don't get the point here, don't know. I think that the rewrite api is still usefull for creating beautiful frontend urls for regular users. But I'm not sure on adding a json ...
0
votes
1answer
34 views

Dynamic URL, not a physical page within the database

Knowing how WordPress essentially processes page requests (through index.php and .htaccess), I'm trying to figure out the best way to "ignore" a certain permalink structure, or rewrite it in such way ...
0
votes
0answers
25 views

How to correctly translate custom posts url rewrites?

I've got a custom post type 'product'. I've just added the rewrite option: 'rewrite' => array('slug'=>__('products','jungle'),'with_front'=> false) Fine. But I want mydomain.com/products ...
0
votes
1answer
16 views

How to change URL structure for pagination pages?

Hi I'm new to WordPress hence if my question was simple or stupid I'm sorry, but please someone tell me how to change URL for pagination pages. Currently I'm having URL for pagination pages as: ...
2
votes
1answer
14 views

how to get archive urls with same origin for custom types and terms?

This is perhaps a strange question adn maybe doesn't have answers, but I'll try. custom post type: product custom taxonomy 1: product_category custom term: type1 custom taxonomy 2: product_feature ...
1
vote
0answers
17 views

how to change permalinks format for pagination?

Sorry if my question was basic or stupid. Please help me how to do this in wordpress, i m new to wordpress. I have permalinks for pagination page like this www.website.com/customtaxonomy.html/1 ...
0
votes
2answers
36 views

add_rewrite_rule() driving me crazy, rewrite not working when analyzer says it should

I have a special situation and need some help achieving the final step. Background: When I access mydomain.com/category/postname, I get the post as expected. When I access ...
0
votes
1answer
26 views

Using rewrite rule to access a view of a plugin from home page

I'm creating a plugin that has a view in front-end and i have a link in home page to access it: /wp-content/plugins/wp-test-plugin/public/partials/wp-test-plugin-public-display.php. But I want a ...
0
votes
0answers
18 views

WordPress removing query strings

I run custom scripts and plugins with GET parameters/query strings. Recently, when I try to access a page with query strings, something happens and the query string gets dropped. This, however only ...
0
votes
0answers
13 views

Change URL to split page with nextpage

I would like to change the URL to the second page of <!--nextpage--> split pages. I have a number of pages like /book/bookname/ that were split into 2 pages, and page 2 is called ...
0
votes
1answer
54 views

$_POST empty in using new php file added to theme

I am using a theme which handles form data with jquery (a handler function defined).I have added a new php file to theme (using it in as template in a wordpress page, also registered with rewrite ...
0
votes
1answer
24 views

Rewrite URL for a specific taxonomy

I registered a post type of 'product', and also registered a taxonomy 'poruct-cats' for this post type. When I want to access to product-cats it seems like below: ...
0
votes
0answers
18 views

Rewrite Rules: Post ID within Post Slug for a Custom Post Type

I've got my custom post type slug article and I need the following permalink structure: http://domain.com/article/postname-123/ The number in the end has to be the post ID. I don't want ...
4
votes
1answer
109 views

Flush_rewrite_rules not working when settings updated

I have added some custom options to my WordPress CMS within the Reading admin page. I am using these options to set some additional pages that I then have bound to custom operations. This method ...
0
votes
0answers
12 views

rewrite rule added to function.php not work

Hello in my custom plugin i want to set custom rewrite rules. First i trying make this with one rule, so i create functions.php file in my plugin folder and i paste into this code: function ...
5
votes
1answer
127 views

Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?

I am writing a plugin that instantiates a custom post type (among other things). It is a multisite plugin and lives in the directory mu-plugins. What is the best practice for handling ...
0
votes
0answers
20 views

Add Rewrite Rule giving 404 Error

I'm having a little problem with Wordpress add_rewrite_rule function. I'm trying to accept a user subscription by using the URL from the email I've sent. The hash I use is generated from ...
0
votes
1answer
35 views

Mod_rewritte - remove ?m=1 from url

Previously, in blogger, desktops were seeing my posts at http://www.example.com/year/month/postname.html while mobiles were directed to an automatically created mobile version at ...
1
vote
1answer
29 views

Enpoint Not Found in Rewrite Tag Permalink

I'm trying to make an XML feed show nice and pretty permalinks rather than showing query strings. The problem is I can't get my /products/ endpoint to show up when trying to process my custom rewrite ...
0
votes
1answer
41 views

Add URL Rewrite Rule To Wordpress

my link http://localhost/abm/?ct_city=la-jolla&search-listings=true i want to this http://localhost/abm/USA/la-jolla Could you help please.. htpaccss file # BEGIN WordPress <IfModule ...
0
votes
1answer
17 views

How to disable wordpress page rewrite rule?

I am having a problem with some rewrite rules. I am using a plugin that makes requests like this: /pluginname?nonce=123456789&action=submit the problem with this is that my wp installation takes ...
1
vote
1answer
47 views

Rewrite Wordpress URL to show CPT meta field data

I'm stuck in need of a rewrite rule. I have set up a custom post type for 'Books', each book has a repeatable field (using ACF Pro) for chapters. I have added a query_var for chapter using the code ...
0
votes
2answers
32 views

Rewriting in wordpress url

Yes we love to make the url more shorter ,more clean. Lets say we have css url like this xxx.com/wp-content/theme_name/css/my_custom_css.css However i would love to display it like this ...
0
votes
1answer
75 views

URL Change - Check if Post Exists Before 404

We had a custom CMS with URLs such as /adele, /slayer, /beastie-boys but now they have the structure /artist/adele, /artist/slayer, /artist/beastie-boys (a custom post type) Obviously when people ...
1
vote
1answer
20 views

Rewrite and custom post type: order by custom field not working

I have a custom post type "placement" with a custom field "position". What I want to do is, on the placements archive page, to order results by the "position" value. I have the following URL rewrite ...
2
votes
1answer
41 views

Custom Permalink Tag breaks Pagination

Most the below work stems from a previous question / accepted answer. I'm trying to achieve the following permalink structure: /listings/ /listings/page/2/ /listings/%state%/ ...
0
votes
0answers
46 views

Paging not working for hierarchical custom post type

I've defined a custom post type called Fishing Reports, and want to break it down by states, then regions. For example: url.com/fishing-reports/florida/northwest/ That part is working as expected. ...
0
votes
0answers
63 views

Connect custom rewrite rules and query variables to wordpress navigation

Setup for getting content My setup for getting custom content in Network of sites where many sites use the same custom data on the side of worpress generated content. Custom classes to get custom ...
1
vote
0answers
83 views

Multisite theme path rewrite using .htaccess

I'm trying to rewrite the theme path for multiple domains (wordpresss multisite) using separate themes, this is my current .htaccess file, this is allowing each site to use seperate CSS files but not ...
1
vote
1answer
60 views

WordPress rewrite rules for state and city

I'm building a site where every state and city in the US has a landing page. I have a database of every city, state, and zip code, set up as a custom post type in WP. Here's what I've done ...
1
vote
0answers
117 views

Add hierarchical taxonomy to permalink for custom post type

I've found various questions about this issue, and I still can't get this to work. I have a post type called "product" and a taxonomy called "type". I'd like the URL for a single product post to be: ...
0
votes
1answer
43 views

rewrites and custom links in page need help with add_rewrite_rule

I have one page with edited permalink, like, address.com/detail/ I need to send there some values by GET request, so i would like the link looks like /detail/value1/value2/ i added this code in ...
0
votes
1answer
115 views

htaccess and redirect to new url using regex

I have a hard time to create rewrite rule for a redirect using part of an old URL for WP. Example: Old URL: http://www.example.com/news/index.php/2014/11/07/my-blog-post-from-old-site or ...