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
305 views

Tricky URL rewrite with custom values in url

We have custom post type as user_images and each of these post has a image attached with image name is 3 digit number followed by extension. When the url http://mysite.com/wp_username/3digitnumber ...
0
votes
1answer
451 views

.htaccess rewrite

I have created a custom post type called 'event' and added an event called London 2012. I want the following URL structure for a page: local.mysite.com/london-2012/speakers I have created a page ...
0
votes
1answer
163 views

Subpages Permalinks Issues

my site looks like: Page-1 (page.php) ... Subpage-1 (custom-collection.php; Custom Post Type) ...... Filtering Output-Post (custom-collection-single.php) When I open the filtering output-post by ...
0
votes
1answer
40 views

Rewrite rules applied differently after upgrade

After WP upgrade from 3.2.1 to 3.4.1 I faced the problem that rules are not applied same way. I have the following rule: (questions-answers)/([mind|nutrition|fitness|beauty]*)[/page/]*(\d*)$ In WP ...
0
votes
1answer
516 views

Multiple parameters in a custom post type url rewrite

I have a custom post type called venues currently they display through the url format: http://mywebsite.com/venue/{venue-name} I would like to have the format: ...
0
votes
1answer
269 views

Why wp redirects me to wp-login.php when I visit a rewritten wp-admin URL?

I have this rewrite rule ^dashboard(.*) wp-admin$1 [L] and wp redirects me to wp-login.php when I try to visit /dashboard (even if I am logged in) Any idea why this happen, and how I can solve ...
0
votes
1answer
483 views

Custom Post Type Date Based Archive URL rewrite [duplicate]

Possible Duplicate: custom post types, wp_get_archives and add_rewrite_rule I have a custom post type called "course" and I would like to create a date based archive similar to the default ...
0
votes
1answer
465 views

Rewrite Rules problem when rule includes homepage slug

I have page Example (ID=443, slug=example) that is configured, through Dashboard->Settings->Reading, as the home page of my WP site. I also have the following rewrite rule configured: ...
0
votes
1answer
39 views

Need Help with Custom ModRewrite

How can I correctly send all traffic from: http://my-domain.com/about/case-studies/clientName/ to http://my-domain.com/about/case-studies/?clientName=$clientName (not seen by visitors) ...
0
votes
1answer
292 views

Keep requested/entered url with add_rewrite_rule

I've got url-rewriting partially working. I have this rule: ...
0
votes
2answers
635 views

Rewrite Rules Are Redirecting and Not Passing VARs

I have the following code in my functions.php file. <?php add_action('init', 'flush_rewrite_rules'); function custom_add_rewrite_rules( $wp_rewrite ) { $new_rules = array( ...
0
votes
1answer
73 views

Leverage WP_Rewrite to pre-validate links / detect invalid links

I'm automatically generating links to (supposed) pages/posts. These links are generated by get_permalink( $post->ID ), so in_theory, should be valid links. Unfortunately, in some situations, where ...
0
votes
1answer
482 views

why is are these rewrite_tags and rules not working?

im trying to get this to work for 3 different pages it was working fine with 1 rewrite, then when i added 2 more its not working for any of them. heres the code: function add_video_rewrite () { ...
0
votes
1answer
483 views

Rewrite custom taxonomy slug - but only parent items

I've set up a custom hierarchical taxonomy called 'region'. So now I have e.g. url.com/region/leeds/ etc. However, I'm now expanding to other countries, so I'm making the region sub-categories of ...
0
votes
2answers
372 views

How can I allow trailing slashes on some URLs without a redirect, but not on others?

Here's the scenario. Assume I have a site, wordpress.site, which has the following Permalink structure: /%postname% Assume I then set up the following posts: /post1 /post2 /post3 If someone were ...
0
votes
1answer
535 views

Rewrite loading custom template file but is_home() returns true, and there's no 404

I want to create some custom pages for my theme that don't appear in the Page listing in wp-admin. I have the following class which intercepts the url. class jtvRewrite { var $path = ''; function ...
0
votes
1answer
296 views

Can’t use a specific custom URL (slug)?

I’m having some problems understanding an error I’m getting. I have a page which is called “pitch” and as such the URL and the slug should be “pitch” as well, so: www.my-domain.com/pitch/ But when I ...
0
votes
1answer
617 views

Rewrite rules for custom post type

There is a nonhierarchical custom post type "news". /news/ /news/page/2/ /news/post_slug/ Each post has custom field "views". When someone opens post, field's value increased by one. Would like ...
0
votes
2answers
488 views

Viewing category pages without the word 'category' in URL

When I view a static page its url is like: http://example.com/mybooks/ When I view a category page its url is like: http://example.com/category/books-ebooks/ For SEO, I want some modification so ...
0
votes
1answer
430 views

Custom taxonomy and post type rewrite rules

I'm working on portfolio site, where I need to create a "portfolio" post type and divide posts in it by categories with urls like "/portfolio/category/", so the "category" is the category term. ...
0
votes
1answer
2k views

Rewrite rule that wp-login.php?action=register is left alone

Unfortunately buddypress breaks a facebook connect script because of the rewrite rules. It changes /wp-login.php?action=register into /register/ I tried to find where the custom rewrite rule is ...
0
votes
1answer
131 views

How to Use metada Value in Url and is it possible? [duplicate]

Possible Duplicate: How to use Post Custom Metadata in Post Titles and Post Permalinks hii i want to know that how can i use my metadata value for post url which i add with my every post in ...
0
votes
1answer
46 views

How to link to custom “archive like” page with custom permalink rules “dynamically”

I am working on a plugin where I am trying to create a "archive like" page with permalinks. Here is what I have so far: I've created a query var "experience" I've created custom SQL selects using - ...
0
votes
2answers
520 views

rewrite_rules() not applying rules on plugin activation only after permalinks menu is clicked

thanks to Roman for pointing me in the right direction my plugin is almost ready. The only problem i am now facing is that i cannot get the rewrite_rules applying on activation they only work after i ...
0
votes
1answer
539 views

HowTo to add my rewrite rules at the beginning, redirect to the right page and flush the rules on plugin activation?

Hi i am currently writing a WordPress plugin that i want to release to the public. I am having a few issues with URL rewrites however. I have got the plugin to redirect to the plugin page ...
0
votes
3answers
863 views

Pages not appearing?

I've created 6 different custom post types, each with their own archive. I've also created a page with the same name as the custom post type, and a sub-page called 'About' for each. For some reason, ...
0
votes
1answer
411 views

How to do make mysite.com/post-name/sub-post?

I have a small doubt and wonder if I could help. By adding a post, I have the permalink "http://www.mysite.com/post-name". I would like to know how to post a parent, for example, ...
0
votes
1answer
896 views

Taxonomy with_front causes all

I have a custom taxonomy, which sets the with_front to false to try and get the URLs to look like /%type%/%brand%/%product%/, degrading as we go down. This however is driving me nuts. Everything in ...
0
votes
1answer
1k views

Custom rewrite rules for a page with GET variables?

So basically I have a WordPress page called games. Within this page I have a list of custom post type posts. Using a form and some $_GET magic, the user is able to filter the posts based on tags, as ...
0
votes
0answers
20 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
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
28 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
1answer
42 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
14 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
19 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
13 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
0answers
17 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
2answers
70 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
1answer
37 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
26 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
18 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
26 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
2answers
36 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
41 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 ...
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
26 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 ...
0
votes
1answer
23 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
17 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. ...