The mod-rewrite tag has no wiki summary.
6
votes
1answer
4k views
How to create custom URL routes?
I have a very peculiar requirement, hopefully I can explain it without being too confusing. I created a page template where I list some properties I get from an external XML file, so far no problems, ...
5
votes
3answers
2k views
Masking wp-content/themes/name/images to just images directory using htaccess
I'm trying what I thought would be something really simple of masking my url but cannot seem to get it to work. I want to be able to link to images in my img tag without having to type in the full ...
4
votes
2answers
289 views
My permalinks are broken! Can I use mod_rewrite to ignore a physical file?
A website I work on recently posted a file at the root of their website named "2011.html." Now, any 2011 blog posts with the permalink structure of year/month/day/post-name do not work, and instead ...
4
votes
1answer
165 views
How to remove dates from existing permalinks?
After doing some research about dates on blogs, it seems like it is a good idea to remove them from the existing posts.
Consider:
Self-hosted (on Bluehost)
Over 1,000 existing posts
All posts are ...
3
votes
1answer
130 views
Removing rules from .htaccess
I'm writing a small plugin that needs to write to .htaccess a simple non_wp_rule and i am doing it like this:
function ci_flush_rules()
{
global $wp_rewrite;
$wp_rewrite->flush_rules();
}
...
3
votes
1answer
150 views
Sub domain redirection to taxonomy
Hi all I want to use sub domain for my taxonomy like that :
http://taxonomy.domain.com/apple map to http://www.domain.com/taxonomy/apple
I add this to my vhost
RewriteCond %{HTTP_HOST} ...
3
votes
1answer
1k views
Wordpress multisite causing Error 101 (net::ERR_CONNECTION_RESET): Unknown error [duplicate]
Possible Duplicate:
WordPress upgrade now receiving Error 101 (net::ERR_CONNECTION_RESET): Unknown error
We have just installed WordPress 3.0.1 and everything worked fine. However, as soon ...
2
votes
2answers
2k views
Making a plugin file accessible via url rewrite?
In my WordPress plugin I have a php file that generates some stats about the blog and outputs it as a simple text file. To access WordPress functions I've included this at the top of the file:
...
2
votes
3answers
258 views
Can WordPress be installed at the root level, if a homepage called index.php already exists?
Can WordPress be installed at the root level, if a homepage called index.php already exists?
2
votes
2answers
877 views
Change author permalink
The original urls for users look like /author/login/
Is it possible to replace login by user's id?
In my dream urls should become to /users/34/ (34 is user id).
Thanks.
2
votes
1answer
41 views
Change permalinks for posts but not for custom post types
Currently my permalink structure for posts is
domain.com/post-title
I'm using a static front page and a "blog" page for posts. I'd like to to change the permalink structure for posts, tags and ...
2
votes
1answer
111 views
Using custom post type parent as slug
I'm currently using the plugin 'Types Custom Post Type' to create custom post types (I know it's pretty easily done through functions.php but I was feeling a bit lazy!).
Basically, I'm looking to ...
2
votes
2answers
256 views
How to protect media directory with .htaccess?
I am trying to protect the uploads directory with .htacess.
But when I browse media section in admin panel, I see user/pass popup.
My guess is, WordPress use fopen to find if the file exists. I ...
2
votes
2answers
1k views
Clean URLs for custom $_GET variables
I have a query var show=othertemplate that I can add to any URL to show any post, page or archive in Wordpress in a different template, like this: mysite.com/[any URL]/?show=othertemplate. I'd like ...
2
votes
1answer
105 views
add new permalink structure from dynamic page
I created page "play" url: http://localhost/myweb/play and inside of page "play" I include PHP code to make the new search from outside Wordpress.
And all worked, if I search from my page "play" the ...
1
vote
2answers
394 views
Using custom mod_rewrite without breaking wordpress permalinks
I am using a theme that uses posts for multiple pages, and the blog posts goes in a category called "blog", I am using the permalinks setting "/%postname%", and the blog menu url is "/category/blog", ...
1
vote
2answers
1k views
mod_rewrite enabled but Permalinks show index.php
I just installed a friends blog on my LAMP stack, which has mod_rewrite enabled (I'm using it for clean URLs on my Drupal installs on the same server). For some reason, WordPress (3.0.3) isn't ...
1
vote
1answer
1k views
“.#[random-char-string]” being inserted at end of URLs
I've seen this on a couple of sites now and I'm having trouble finding information about (probably because it's awkward to describe):
All internal URLs like this for example:
...
1
vote
2answers
204 views
How to map permalinks with accented letters to sanitized slugs?
To keep legacy entries on a blog hosted on TypePad on sync with a new WordPress installation...
How do I map this permalink with accented letters:
domain.com/no-es-fácil-alejarse-de-la-política
to ...
1
vote
1answer
439 views
How to rewrite WordPress uploads folder to another folder using htaccess
I found that the following code online could be used to spoof the WordPress uploads folder, rewriting URLs to a different folder on the server:
# BEGIN Spoof wp-content/uploads directory
...
1
vote
1answer
77 views
Should I enable FastCGI on WordPress?
I am looking at my server settings and these are as follows:
WebDav : active
FastCGI : inactive
SSL support : active
Perl as Apache module : CGI-Programm
PHP module : ...
1
vote
2answers
71 views
a one-off rewrite rule
I have one page that I need to change the URL for.
Currently, the page resides at example.com/departments/human-resources/
(human-resources is a sub-page of /departments/ )
My client wants to ...
1
vote
1answer
140 views
ReWriteRules and WordPress Multi-Sites with Sub Directories
I'm having a diffucult time getting the ReWriteRules and URL structures setup for a Wordpress 3.4.2 (latest version as of this post) blog with multi-site enabled.
www.ourdomain.com/ is the homepage ...
1
vote
1answer
161 views
modrewrite not working on my Apache setup
Not sure if this is webmaster or a WordPress question, it's a bit half and half, sorry if I'm posting in the wrong place.
Without using Multi-Site or installing new WordPress CMS' in second-level ...
1
vote
1answer
258 views
WordPress mod_rewrite is canceling/overwriting my other mod_rewrite rule
in /www/ I have an .htaccess file containing:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([^.]*\.less)$ compilers/lessphp.php?file=$1 [R,QSA,L]
...
1
vote
1answer
786 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 ...
1
vote
1answer
341 views
Need help with simple rewrite rule (shouldn't this be easy?)
All I need is a rewrite that will change example.com/anyphrase into example.com.
Here is what I am using:
RewriteCond %{HTTP_HOST} ^example\.com
RewriteCond %{SCRIPT_FILENAME} !wp-admin
RewriteCond ...
1
vote
1answer
185 views
mod_rewrite loop, redirecting http to https on certain section of wordpress blog
I'm trying to rewrite 3 sections of a wordpress site to https if they are accessed over http:
/cart/
/my-account/
/checkout/
As well as these rewrite's worpress has added a rewrite to remove ...
1
vote
0answers
57 views
Changing URL scheme, mod_rewrite not helping
We're trying to move away from the /YYYY/MM/DD/Post-Title URL structure without breaking links that are floating around on the internet. The mod_rewrite rule is fairly straight forward -
RewriteRule ...
1
vote
0answers
71 views
I have a page using a pretty url and a mod_rewrite rule matching it. I expected it to give an error but it's working. Why?
this may seem like a weird question but I have something working and I don't understand how.
I have moved my wordpress install to a subdirectory and am using the .htaccess file to redirect anything ...
1
vote
0answers
89 views
Some posts from custom post type to subdomains
I have custom post type where all posts associated with some persons.
Like: mysite.com/masters/master-name/
And i need to have redirection from master-name.mysite.com.
This redirection will be ...
1
vote
0answers
85 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
3answers
146 views
Wordpress home page showing 404 error
I've had a look for anyone experiencing the same issue but to no avail.
I am currently working on a Wordpress site that previously did not have permalinks, so have added these (i.e. to change the ...
1
vote
2answers
117 views
mod_rewriting conflict with WP permalinks in htaccess [closed]
I need some help! I'm trying to rewrite this...
localhost/blog/?c=var to-> localhost/blog/var
But seems there is some problem... I get a 500 :( I also believe there is some conflict with the ...
0
votes
1answer
2k views
Interesting Custom Post Type Slug with Taxonomy and Custom Field
I have created a custom post type called "events" and have also created a custom taxonomy which only shows up on this specific post type through which the admin must select an "event category" ...
0
votes
3answers
619 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', ...
0
votes
2answers
942 views
mod-rewrite exception? keep #hash in matching urls?
Hey guys,
My WordPress permalink structure is set to `/%postname%/.
When I create a page with a name "FAQs" the permalink generated is "mydomain.com/faqs".
When I link to this page in my code ...
0
votes
1answer
48 views
Use the category name instead of category slug in permalinks
How to create a permalink structure which finish by:
/category-name/post-name/
Instead of:
/category-slug/post-name/
By default, Wordpress is offering %category% tag strucure as "A sanitized ...
0
votes
1answer
409 views
Can't get permalinks working!
I can't get WordPress pretty permalinks to work on my Fedora LAMP server. If I set them and click a page/post link I'll get a ""Oops! This link appears to be broken."
The .htaccess file is writable ...
0
votes
2answers
652 views
Why is my mod_rewrite not working?
Ok I have a WP site using the permalink structure of /%category%/%postname%/
I have built it in the way of page templates, using category queries inside, i.e.
page-help.php
<?php $my_query = new ...
0
votes
1answer
179 views
Wordpress and Htaccess
Removing RewriteBase / from my htacess has sped up my site which is still working correctly.
Is it really required and what is it for?
0
votes
1answer
1k views
404 when fetching image from wp-content/uploads/
I get 404 status when fetching images, and the http still contains that image. Image shows up in a browser, but the 404 code breaks some applications.
calls to wp-content/uploads/ are redirected in ...
0
votes
1answer
33 views
Types plugin breaking because of server configuration
I have tested this on three different hosts, using a number of different versions of both Types and WordPress, and I believe I've narrowed it down to my host (Firehost) setup, which they recently ...
0
votes
2answers
101 views
How do I make WordPress revise an .htaccess file a certain way?
I've learned just a slight bit with WordPress Rewrite API -- just enough to add another rewrite rule for a plugin. The plugin works if installed in the root, but I'm finding that if one installs ...
0
votes
2answers
136 views
How do I add my PHP app to a Wordpress page whilst keeping semantic URLs?
I am rebuilding a static website for a client using Wordpress on the main domain- eg domain.com. There is also a directory of members website at directory.domain.com which I was hoping to migrate over ...
0
votes
1answer
132 views
Redirect URL Containing åäö
I'm moving my blog from Typepad to Wordpress but have a big problem. Among the urls that are exported from Typepad, many containing åäö. When they are imported WordPress changes all URLs and instead ...
0
votes
1answer
205 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
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)
...
0
votes
1answer
82 views
How can I create a smarter .htaccess file that will add a directory?
This is my current .htaccess file:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) /directory/ [R=301,L]
And "directory" is where my wordpress install is. So this simply redirects people ...
0
votes
1answer
149 views
How to configure Multisite Network with randomized hostnames?
I'm trying to convert a freshly-installed and functional WordPress into a multisite network. But I'm having problems because of our Apache configuration.
We use Apache to randomly redirect requests ...