The rewrite-rules tag has no wiki summary.
0
votes
3answers
170 views
How to access .html file that's located in the theme folder from the browser?
By default you cannot access a file inside the theme folder directly from the browser, what changes should I make to make an exception?
1
vote
1answer
93 views
add_rewrite_rule behaving strangely
I'm customizing another plugin by changing the rewrite rule, from:
add_rewrite_rule('^api/auth/([0-9]+)?/?','index.php?__api=1&uid=$matches[1]','top');
to:
...
2
votes
1answer
68 views
How to get wordpress link to fully evaluate when coming from facebook
The short version:
Any link from Facebook to a page stops evaluating at the "hardcoded page" in the wordpress press install, ignoring the remaining parts of the URL. It doesn't allow the shortcode ...
5
votes
1answer
364 views
Rewrite Rule for Multilingual Website, Like qTranslate?
I would like to write my own little plugin for language switching. For that, the very first thing would be to get the rewrite rules running. I have been looking around the web for 2 hours, but I ...
1
vote
1answer
254 views
Rewrite rule for a query string
I have a taxonomy search form and the link output is
http://localhost/wp/?cityid=16
But i want it to be rewrited as
http://localhost/wp/cityid/16
.htaccess
# BEGIN WordPress
<IfModule ...
1
vote
0answers
73 views
Getting 404 error on my wp rewrite error
The code I'm using to rewrite urls with query vars:
function add_query_vars($aVars) {
$aVars[] = "city";
$aVars[] = "address";
$aVars[] = "pg";
return $aVars;
}
// hook add_query_vars ...
0
votes
1answer
188 views
rewrite rules hierarchical
I want that my wordpres follow this rules:
/productes/ a page with all productes
/productes/[category]/ a taxonomy-page with all productes of the category
/productes/[category]/[subcategory]/ a ...
1
vote
0answers
88 views
Evaluating a external rewrite rule before internal wordpress rewrite rule
I am been plucking out my hairs since last few days trying to solve this problem:
I want to convert my urls from format
http://example.com/prodsearch/category/tag1-tag2-tag3-tag4
to
...
1
vote
1answer
205 views
remove_query_arg() on rewrite rule
I'm attempting to add a Back to Search Results link which in essence will simply link back to the starting search page - for example /?s=test. I've taken a look at the global query vars and do see ...
1
vote
1answer
75 views
Different rewrite rules for taxonomies and cp in multisite?
I´m making a multilingual site with multisite and I`m wondering if you can specify different rewrite rules for taxonomies and custom posts for the different sites, that are using the same theme. Maybe ...
1
vote
0answers
447 views
How to change “attachment_id” in attachment permarlink?
I changed attachment permalink by add_filter('attachment_link','my_media_url');
from
http://domain.com/?attachment_id=123
to:
http://domain.com/?media=123
The change is successful. But, with the ...
4
votes
2answers
1k views
Change the “page” slug in pagination
Simple question. When pagination is activated, the URL changes to "site.com/page/2". For my site, this should be "site.com/paggetto/2".
How can I change that rewrite rule? I also want to change ...
0
votes
1answer
68 views
Wordpress Rewrite Rules
I created the page template which needs to take some GET variables, currently URL's looks like that:
http://example.com/coupons/?cat_id=25
I need to make that way:
http://example.com/coupons/25
I ...
0
votes
1answer
661 views
i want to rewrite my custom plugin url
I am Working on wordpress plugin. and i have a form like this
$action_url = WP_PLUGIN_URL .'/demo-url-rewrite/include/test.php';
<form action="<?php echo $action_url; ?>" ...
2
votes
1answer
756 views
Permalink rewrite with custom post type and custom taxonomy
I think thats a quick one:
I've got:
Custom post type: Food
Custom taxonomy (Registered to Food): Fruits
Terms in Fruits: Apple, Orange, Cherry
If I type in example.com/food?fruits=Apple,Cherry, ...
1
vote
1answer
280 views
All pages after level 1 showing 404 after WordPress migration plugin - how to fix?
I am in the process of moving my blog away from GoDaddy (yey!) to HostGator. I used the migration plugin on GoDaddy tat created the gz archive of the database, and I copied all my files over to the ...
0
votes
1answer
120 views
Problems with rewrite rule
I realy cant to figure this out.
What i want to do, is this URI http://www.hotels-lithuania.net/index.php?page=76&type=hotels&id=1 transform to http://www.hotels-lithuania.net/item/hotels/1.
...
0
votes
1answer
215 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 ...
3
votes
1answer
162 views
Modify custom post type rewrite rules in a separate function
I want to modify the rewrite rules for a custom post type, tribe_events, which is registered as a post type within "The Events Calendar" core plugin files (the-events-calendar.class line 24):
...
0
votes
1answer
203 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
1answer
118 views
Rewrite ugly URL to clean URL
Im trying to go from:
http://www.example.com/product?level1=value1&level2=value2&level3=value3&level4=value4
To:
http://www.example.com/product/value1/value2/value3/value4
Sometimes ...
4
votes
3answers
323 views
How to add a custom URL placeholder to author archives?
I am working with a client who has a directory site that allows users to create accounts, then lists of items from the directory. Right now, whenever a user creates an account, she gets a profile URL ...
0
votes
1answer
111 views
New rewrite rules for custom taxonomy and reuse default
I have a taxonomy location. All terms except one are to be treated differently. That's why I have two php files
taxonomy-location.php
taxonomy-location-national.php
Now, I want to make the URLs ...
0
votes
1answer
237 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
309 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
2answers
190 views
Help with url rewrite
How can I turn a URL like:
http://site.com/?project=5
into:
http://site.com/project/5/
?
I was looking the rewrite doc here:
http://codex.wordpress.org/Class_Reference/WP_Rewrite#Examples
and ...
4
votes
1answer
795 views
add_rewrite_rule() vs $wp_rewrite->rules vs 'rewrite_rules_array'?
I've written Rewrite rules for my custom post types. they work well except that WP doesn't update the url in the User Agent when the redirect_url doesn't match the requested_url.
everything else ...
1
vote
1answer
310 views
Does WP Have a Function To Generate .htaccess RewriteCond?
I know that I can edit .htaccess manually and add a RewriteCond statement inside, but I need to build a plugin that does this the proper way by using WP rewrites which then get pushed into .htaccess ...
0
votes
1answer
178 views
Rewrite /category/cars into /topics/cars
I know there are plenty of question and posts about this out there, however I couldn't find a solution or existing thread to my specific question.
If I list my categories and click on "cars" the url ...
2
votes
3answers
327 views
flexible rewrite 'ramble' URLs with Wordpress
I want to access my post with id 17 like this:
http://localhost/archives/17/moot-bla-foo-ramble
In other words, the id shall decide, everything thereafter may (or may not) be the slug or anything ...
0
votes
1answer
38 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)
...
1
vote
1answer
208 views
How To Consistently Enforce Rewrite Rule in Plugin Development
Let's say I create a customer support plugin that hijacks the /support part of the URL and redirects it to an MVC framework in my app folder of my plugin folder, like so:
RewriteRule ^support(.*)$ ...
1
vote
1answer
192 views
Best structure / rewrite rules to achieve the following url
I have been trying to achieve the following url structure in Wordpress and maintain a level of reusability in the admin area.
It is for a client preview area and needs to reflect multiple versions of ...
0
votes
2answers
780 views
Rewrite-Rules not working on a vhost, everything goes to index.php
after setting up the wordpress htaccess rules in my vhost, i was unable to enter the wp-admin area. I was always redirected to the frontpage of my wordpress instance.
The rewriting itself worked on ...
4
votes
1answer
233 views
Custom Rewrite Rules Not Sticking
I've written some custom rewrite rules for a special feature on http://www.pewhispanic.org/states/. States is a page with a custom page template, page-states.php. The logic for returning the right ...
1
vote
1answer
571 views
Auto generate rewrite rules for multiple taxonomies
so i'm back with rewrites... i am looking for a more automated solution.
i stumbled across this on the interwebs:
/**
* Generates all the rewrite rules for a given post type.
*
* The rewrite ...
1
vote
1answer
86 views
custom template rewrite
I have a page called my-todo-list and is using a custom page template.
The page is accessible via this type of URL : http://domain.com/my-todo-list/
Now I need to paginate it, and I want to look ...
1
vote
3answers
517 views
Custom Post Types: pretty search URLs and has_archive
This is a question based on the comments from the answer here.
I'm using the following code to create a couple of different search boxes for my website:
<form action="<?php echo home_url( ...
6
votes
0answers
427 views
add_rewrite_endpoint() not working for custom post type archives [closed]
i'm working on somekind of wiki/encyclopedia system based on wordpress.
there are two custom post types. i'll show my configuration for one of them:
$labels = array(
'name' => _x('Objects', ...
2
votes
2answers
1k views
Rewrite Rules for Multiple (more than 2) Taxonomies
I am using woocommerce and have some 'product attributes' which are just a taxonomies.
I have the following taxonomies:
pa_color
pa_material
pa_style
the pa_ stands for product attribute and it ...
0
votes
1answer
193 views
Keep requested/entered url with add_rewrite_rule
I've got url-rewriting partially working. I have this rule:
...
1
vote
2answers
452 views
Customising rewrite rules for CPT single post URL to work as paged URL
I've got a CPT called Service registered as following:
$args = array(
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'has_archive' => false,
...
0
votes
1answer
242 views
add_rewrite_rule not added to htaccess when index.php is used in rewrite rule [closed]
I'm trying to add some rewrite rules to a plugin that is supposed to redirect to different urls, basically rotates through urls I add in the admin.
Example: The plugin creates ...
2
votes
1answer
635 views
How to rewrite custom post type with custom taxonomy urls?
I am working in a WP multisite which runs on a classipress theme and there is a custom post type "ad_listing" and custom taxonomy type "ad_cat". Now the url is like this
...
5
votes
3answers
550 views
How-to add rewrite rules to point the uploads folder to a subdomain
The goal Point the upload-folder to a static subdomain to serve adaptive images, that can get cached.
WordPress Rewrite Rules
You can read more in detail about rewrite rules API at Christopher Davis ...
0
votes
2answers
363 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
1k views
Custom post type permalink endpoint
I have a custom post type called "destinations" and I have set the EP mask for the post type to default EP_PERMALINK. I have added a couple of endpoints as follows :
add_filter( 'query_vars', ...
1
vote
1answer
176 views
Can't add external rewrites
I've got the following code in my functions.php
function add_custom_rewrite_rules(){
add_rewrite_tag('%gallery%','([^/]+)', 'gallery=');
add_rewrite_tag('%album%','([^/]+)', 'album=');
...
1
vote
1answer
860 views
Rewrite wp-login.php URLS to static pages?
I'm struggling with getting a few things in WP to redirect.
I'm using a front-end profile / profile editor, and I'm also using a front-end login/register.
Naturally I would like to redirect the ...
2
votes
1answer
389 views
add_rewrite_rule not producing anything in $_GET
Trying to get pretty permalinks happening for a plugin that displays events
I have this:
function my_add_rewrite_rules() {
global $wpdb;
$org_options = get_option('event_settings');
// ...
