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
2answers
263 views

add_rewrite_rule not working for me

I have the following rewrite tags defined: // ADD REWRITE TAG FOR 'VEHICLE MAKES' add_rewrite_tag('%make%','([^&]+)'); // ADD REWRITE TAG FOR 'BODY STYLES' ...
0
votes
0answers
8 views

How to combine 2 separate htaccess [migrated]

I have 2 separate htaccess and i need to combine them into one but im not sure how to do it. These are my htaccess: 1 (the current one) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ...
1
vote
1answer
25 views

Permalinks, Rewrites, Get Variables, Oh My!

Ok, so I know it's a silly title, but it's exactly how I feel right now.. I've created some custom rewrites for WordPress and they work great, the only problem is that now I need to add pagination. ...
1
vote
1answer
481 views

Custom query_vars and parse_request on wp-admin

I've read this post http://wordpress.org/support/topic/query-vars-in-admin and although it's quite an old question, it suits me perfectly. I'm trying to accomplish what I already posted here: ...
1
vote
1answer
423 views

Wordpress Rewrites - How can I pass a variable to Custom Post Type?

I'm looking for a wordpress rewrite that will let me pass a query var. I have a custom post type that produces urls like this: example.com/custom-post-slug/custom-post-title/ my goal is to have ...
0
votes
1answer
330 views

Custom Post Type Rewrite To Include Parent Page(s)

I have a page title "more" with subpage "cities-guide". Said "cities guide" page has a loop that pulls in posts from custom post type "thailife_city_guide". My permalink structure is ...
1
vote
2answers
701 views

Display posts from Custom Post Type in category page on front-end

I created my Custom Post Type (bizdirectory), created a new post (Test Business) and created a new category (Business Directory). But if I add the Business Directory category (slug = business) to my ...
0
votes
1answer
276 views

rewrite rules hierarchical

I want that my WordPress follow this rules: /productes/ a page with all products /productes/[category]/ a taxonomy-page with all products of the category /productes/[category]/[subcategory]/ a ...
1
vote
3answers
522 views

Pagination: /tags/tag_name/?paged=2 gives a 404 error

I need to paginate an archive page. Pagination works perfectly fine for everything except tag/category archives. Basically if I use /tags/tag_name/?paged=2 it gives me a 404 error. But if I use ...
1
vote
1answer
330 views

How to add custom rewrite rule to .htaccess?

I want to add a custom rewrite rule to my .htaccess file using a function inside functions.php The rewrite rule I want to add is as follows: RedirectMatch 301 ^/author/(.+)$ http://name-blog.com/$1 ...
1
vote
2answers
307 views

Custom post type paging 404 error

I've an issue on custom post type, I've create a custom post type called "Agenda" and the rewrite url for http://example.com/agenda it works correctly, it points to the archive-agenda.php template ...
1
vote
2answers
384 views

Old blog/ and blog/feed/ URLs not working after moving blog to top-level via .htaccess

For a long time I served my blog from http://www.murrayc.com/blog/, with the wordpress installation in /home/murrayc/murrayc.com/blog/. Now I've moved it to http://www.murrayc.com/, without moving the ...
0
votes
0answers
10 views

Exclude one specific slug from rewrite rule

I use the following rewrite rules to show a specific post of a custom post type in a category and all posts of a custom post type within a category: add_filter('rewrite_rules_array', ...
0
votes
1answer
16 views

Rewrite slug of custom post type to include post-id

My current permalink setting is /%postname%/%post_id%/. Would like to use the same with CPT. Currently the URL looks as site.com/questions/title/ Would like to get post id at the end of the url on ...
1
vote
1answer
131 views

Migration from old CMS to WordPress 301 redirection rules?

I need 301 redirection rule for migrating old CMS to WordPress. On old CMS I have URL structure like this: I wish is to move my site to WordPress and to have all old (or most) URLs with 301 redirect ...
3
votes
2answers
470 views

Rewrite url for custom post type

I'm using WPML plugin to translate my site. I have a custom post type called "vinos" and I use this args: $args = array( 'labels' => $labels, 'hierarchical' => false, ...
0
votes
0answers
17 views

Rewrite Rule Not Working

I am trying to use a rewrite rule to get 3 variables from the URL. Here is my rule: add_action( 'init', 'pe_rewrite' ); function pe_rewrite(){ add_rewrite_rule( ...
0
votes
1answer
425 views

Custom url structure - pages under a custom post type

I'm struggling with the structure of my Wordpress site and I was hoping you might be able to give me some advice. The site is for a series of events and the structure is as follows: Gateway ...
1
vote
1answer
241 views

Need to add rewrite rule that adds in additional information about the post to url

A have a post type for venues which have the attributes title, state, and suburb. Currently using the default WordPress permalinks I get the following format: mysite.com/venue/{title} However, I ...
0
votes
1answer
39 views

404 when using pagination in a category

I always struggle with pagination in wordpress. I really wish that was a definitive guide to wordpress rewrite rules. I have a site setup this way: permalink custom structure: ...
0
votes
0answers
38 views

URL rewrite custom taxonomy using add_rewrite_rule() or generate_rewrite_rules()

I'm trying to get my head around amending some URL's for a website I have created. After reading two (very informative) answers (1, 2) but I'm still a little unsure how to approach creating a URL that ...
0
votes
0answers
31 views

How to Combine Two Custom Post Types into Single Permalink Structure

The website uses - A) A hierarcical Custom Post Type "Destination" to support the following structure, so each tier of the hierarchy could have its own unique destination guide: Territory - ...
0
votes
1answer
27 views

How do I reset a rewrite?

I made a mistake in writing a previous rewrite in .htaccess. How do I reset it? My home_url = http://basicsourcemassage.ca/bsmassage My site_url = domain name All pages work fine except for the ...
0
votes
0answers
12 views

Rewrites and Attachments

I'm currently working on a custom post type that has rewrite tags to allow for sub pages. e.g: showcases/project-name/media/ Media being the page. My problem is with attachments and media uploads, ...
0
votes
0answers
13 views

how to change some of the rules in the database

I need to add a rewrite rule for a WP page. I noticed that the rule is already part of the existing set, but apparently it is not correct. With the hope some internal mechanism would have replaced ...
0
votes
0answers
33 views

Help with add_rewrite_rule solution

In my Wordpress blog, I configured permalinks > Category base to "magazine" with links having this format: http://www.mydomain.com/magazine/news/europe/france The above link opens the France ...
0
votes
2answers
41 views

Redirect to a file in a WordPress theme directory

I have a site where http://mysite.com/wp-content/themes/mytheme/pdf.php creates a pdf of some content based on what's in a cookie. That URL is pretty ugly. I'd love the url to simply be ...
0
votes
1answer
62 views

How to use wp rewrite to hide form action url?

I have a widget that I'm making that builds a multi-step form which retrieves xml data from a third party plugin (http://xmlplugin.com/geoquote.php). While this plugin is available for use already it ...
0
votes
1answer
18 views

Font Page overrides rewrites

I have a custom rewrite as follows So /shares points to a page I created with a slug images which uses a custom query variable named h626_page. My problem is I want to set the images page as ...
0
votes
2answers
27 views

Rewrite for page with a possible unknown parent page

I am trying to add a wp rewrite for my plugin that allows users to include a shortcode on a page that will then display a calendar. This calendar then requires url params in order to navigate the ...
0
votes
2answers
14 views

Rewrite the Wordpress URL from custom plugin

I have created a plugin in wordpress. I am making a cURL request to the server and server response is coming to new index.php. Which is in my_plugin/newfolder/newfolder/index.php. Now from the server ...
0
votes
2answers
121 views

Custom post type child page 404

This issue seems to be quite common, but the solutions that worked for others haven't worked for me. I'm using the CPT UI plugin and have created a CPT called 'courses' with the following settings: ...
0
votes
0answers
19 views

Rewriting URLs with Query Strings

I've been (unsuccessfully) attempting to prettify some URLs in a website I'm building in Wordpress, from something like this - ...
0
votes
1answer
48 views

Rewrite Endpoints and CPTs - How to use in a plugin

I'm working on rewrite rules for a plugin that uses a URL endpoint, /modifier, to create a query_var &modifier=1 to signify it should do something else. The rewrite deals with URLs where ...
0
votes
1answer
72 views

Using get_query_var() from a plugin

I'm trying to do a redirect feature in a plugin and i have an issue. First, the code: add_action( 'init', function(){ add_rewrite_rule( 'go/([^/]+)/?$', 'index.php?redirect_to=$matches[1]', 'top' ...
0
votes
1answer
38 views

.htaccess RewriteBase equivalent for WordPress - Passing a URL as a variable without getting a 404

I have a page ran by a javascript plugin that changes the url every time a slide in a gallery is cycled. This means that while slide 1 is visible, the URL is http://www.sitename.com/gallery/slide1/ ...
0
votes
0answers
25 views

URL rewriting with custom pagination

I'm using a custom query to display the results with the pagination and rewrite the URLs. The following function works fine and displays the URLs in following pattern: ...
0
votes
0answers
42 views

Wordpress permalinks on subfolder in iis7 not working

I have IIS 7.5. mod rewrite active. Currently, my wp site is inside subfolder. Here is web.config in my root folder : <rewrite> <rules> <rule name="site2.com" stopProcessing="true"> ...
0
votes
1answer
63 views

Rewrite Rule for Post “Subpage”, with pagination

I would like to know if is possible to add a "subpage" to a post and in this "subpage" have paginated content, for example: I Have a Post Lorem Ipsum This post has Videos, Photos and Audios as ...
3
votes
2answers
423 views

Make post slug have priority over category slug

I have a wordpress site where the category base is stripped from the url. Now, when a category has a certain slug that's similar to a post slug, the category is shown. I would like to show the post ...
0
votes
0answers
15 views

Rewriting URLs with query strings and preserving them

straight to the issue - I MUST preserve link structure as follows, otherwise the baby squirrels die: website.com/blog.html?comments=%id% where the %id% stands for ID of post basicaly, that ...
0
votes
1answer
34 views

Why doesn't WP update my .htaccess file?

Before I begin, I do not have WordPress having permissions to update the .htaccess file. That's not what this is about. I'm full aware of that. My problem is WP generates the same file every time for ...
1
vote
0answers
46 views

Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)

I have a custom post type named "tours" and a custom taxonomy named "tour_type". "tour-type" taxonomy is hierarchical. In "tour-type" taxonomy, parent terms are limited to "eco-tours", "daily-tours", ...
2
votes
1answer
5k views

Custom page with variables in url. Nice url with add_rewrite_rule

Using WP3.1 I Have a custom page with a WP_Query and the query gets dynamic variables from the url. And i want safe variables and clean urls. Example: ...
0
votes
1answer
24 views

Change Admin URL

I changed my Wordpress directory structure quite a bit. Here's what I have: define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wordpress'); define('WP_HOME', 'http://' . ...
0
votes
0answers
23 views

WP Rewrite Rules - insert custom rules

function rewriteRules() { add_filter( 'rewrite_rules_array', array( $this, 'my_insert_rewrite_rules')); add_filter( 'query_vars',array( $this, 'my_insert_query_vars')); ...
0
votes
0answers
25 views

URL-parameters and RewriteRule gives 404

In Wordpress I have a template (lets call it template.php) that has content on the following page: example.com/template This page should be able to handle URL-parameters like. I got this to work. ...
0
votes
1answer
42 views

How can I write a rewrite rule to appear to move a multisite?

As we concluded in my question about trying to change the url of a multisite the simplest solution might be to add a rewrite rule, since it is infact only the end result that I'm concerned about here. ...
0
votes
0answers
28 views

URL Rewrite for CPT single posts

I'm struggling with Wordpress' rewrite function I have the following URL structure http://example.com/album/test-7/ 'album' is the slug for the CPT single page 'test-7' is the slug for the CPT ...
0
votes
1answer
37 views

How to add a Rewrite Rule / Category Structure

I'm currently trying to use add_rewrite_rule() to create a rewrite (duh!), for a custom taxonomy page. I've added the rewrite tag "sort" with the following code: ...