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
294 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
1k views

add_rewrite_rule again

In general, the code from this question fit to me for 90%. One little change I need - I want all URL like *example.com/snpv/any_text/* direct not to index.php as in original code, but to my.php script ...
1
vote
3answers
714 views

How to add .htaccess code through a function?

I need to add the following .htaccess code through a function <IfModule mod_deflate.c> # Insert filters AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html ...
0
votes
1answer
461 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
2answers
389 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
419 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
122 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 ...
1
vote
2answers
758 views

Where do I USE add_rewrite_rule?

I need to add a RewriteRule to my site. I have tried in .htaccess with no luck, it doesn't get parsed, so I'm all but giving up on that. I found the documentation on add_rewrite_rule, but have no ...
0
votes
1answer
45 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 - ...
1
vote
1answer
119 views

ReWrite rule for files of a previously standalone blog moved to network

A moved a standalone wordpress install to be one of a network, but the possibility to access the uploaded files with the same URL is need to be kept. I'm trying to get the following rewrite rule to ...
0
votes
1answer
513 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 ...
2
votes
1answer
900 views

Prettified page URL w/ query var redirects to prettified page URL w/o query var

I have a page created (page ID 235) with a page template that will need to be passed a variable. I would like to pass this variable through the URL. My first attempt was to pass this with a GET ...
3
votes
1answer
247 views

Help with a TV series Rewrite structure

Not sure if this is possible, but bear with me. I think I am halfway there. First a little background: I'm using the build in hierarchy in WordPress to form relationships between post types. I ...
0
votes
2answers
341 views

how to properly rewrite url by custom var

ive been trying to rewrite a shop uri, and what i have now is this code: add_filter('rewrite_rules_array','wp_insertMyRewriteRules'); add_filter('query_vars','wp_insertMyRewriteQueryVars'); ...
0
votes
3answers
748 views

Need to make a php file inside theme accessible via url

I checked this post here Making a plugin file accessible via url rewrite? which seems to have the same problem as me but its for a plugin. But so far i am getting 404. add_action( 'init', ...
4
votes
1answer
2k views

Querystring parameter getting lost in rewrite rule

I have successfully added a custom post type and the permalink structure works great. So, for instance, I've got a custom post type books, and the permalink to a book is /books/the-dictionary. My ...
3
votes
3answers
560 views

Plugin to Consume a Web Service

I'm attempting to write a knowledge base plugin to consume the Salesforce API and pull in solutions in a RESTful style application path; however, some of the core plugin concepts escape me. For ...
1
vote
2answers
283 views

Custom URL rewrites work, but break my permalinks

I'm doing custom URL rewrites according to this method , which work beautifully. But as a result my regular post permalinks are broken. So, I'm rewriting "/pagename/1232432" into ...
1
vote
1answer
1k views

How to fix pagination after rewriting url? ie. www.site.com/players/type/pro/page/3/

I have a custom post type of players, and archive-players.php lists them all at an address such as www.site.com/players. I'm then using a url like www.site.com/players?type=pro to list another page ...
2
votes
1answer
452 views

custom permalink/shortlink with base62 encoded post ID

I want my post-links to look like /%post_id62%_%postname%/ where %post_id62% is the post ID in base62 encoding (e.g. http://example.com/y9Rlf_test/) and my shortlinks to consist of /%post_id62% only ...
0
votes
1answer
617 views

Can't get pretty permalinks to work without index.php

I've worked with WordPress for a while now and this is the first time I've had this problem, I can't get my permalinks to work without index.php on the URL even though mod_rewrite is enabled, a few ...
2
votes
1answer
2k views

How do I remove a rewrite rule?

I've added a rewrite rule with the following code, and now I need to remove it. add_rewrite_rule('^events$', 'index.php?post_type=events', 'top'); My issue is not that the rule is not working. It ...
0
votes
1answer
88 views

Page permalink rewrite

I added the following code which allows categories on my 'Page' post type. add_action('init', 'edit_page_type'); function edit_page_type() { register_taxonomy_for_object_type('category', ...
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 ...
1
vote
3answers
3k views

TimThumb & htaccess : clean url

Do you know if there's a way to alter via htaccess the timthumb urls ? My question is if i can change for example urls like this ...
3
votes
1answer
239 views

Custom comments

I'm trying to create a custom comments page with pagination. I have non-hierarchical custom type "apartments". It makes urls like: /apartments/ - for acrhive /apartments/%id%/ - for post page ...
0
votes
1answer
696 views

How to test custom rewrite rules /permalinks?

After much research, I think I can wrap my brain around WP's rewrite system. I would like to know, though, how to properly test rewrite rules to see if the right rule/tags is being used and the right ...
2
votes
0answers
167 views

need a help for modify .htaccess rule [closed]

here is my wp .htaccess # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wordpress/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
1answer
593 views

Custom Permalinks for Custom Post Types

I have custom post types registered and they are working fine with their normal URLs. My Custom post types have 'members' as their slug. Now I am trying to have a custom permalink for my custom post ...
0
votes
1answer
469 views

Taxonomy Rewrite Rules Redirecting Instead of Masking

I have a custom post type of items set up. I also have a taxonomy set up with items called categories. functions.php code: regsiter_post_type('items', array('labels' => array ...
0
votes
1answer
916 views

Custom Post Type pagination when CPT 'rewrite' rule and a page have the same slug

I would like to achive the following link structure on my site: /properties/ -> a properties page with properties CPT, page 1. /properties/page/2 -> a properties page with properties CPT, page 2. ...
4
votes
1answer
627 views

How Do I add a redirect rule to Wordpress?

Right now, I'm able to dynamically generate js and css, based on my theme options To do that i set up a query var, that if present redirects to a php file, which then loads itself as a javascript ...
2
votes
2answers
836 views

Preventing index.php?category_name=something from redirecting

I'm trying to filter posts in a category by the year of the post's date. I also want to do this without being redirected to the year template so my ideal URL would be ...
1
vote
2answers
187 views

Help With Rewrite_Rules For a Custom Plug-In

I've been reading through this question and answer with great interest as I'm trying to achieve something very similar, but I'm failing and was wondering if someone could help me out. I am also using ...