The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.

learn more… | top users | synonyms

0
votes
1answer
249 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
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 ...
2
votes
2answers
416 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 ...
1
vote
2answers
474 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 ...
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
216 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 ...
1
vote
3answers
631 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 ...
0
votes
1answer
205 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 ...
1
vote
2answers
149 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 ...
3
votes
1answer
236 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} ...
0
votes
2answers
636 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( ...
1
vote
1answer
1k 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 ...
0
votes
2answers
476 views

modify URL with mod_rewrite or hook

i'm trying to achieve the following: user enters this URL into browser http://mydomain.com/boston/categoryname/postname/ i then want to get the first "folder" and check whether or not it's ...
0
votes
1answer
127 views

help with rewrite_tag and rewrite_rule for custom page GET variables [duplicate]

Possible Duplicate: custom htaccess rewrite rule for page ok i made another post and i got pointed to the Rewrite API however, when i do print_r($_GET) on the page, it echos an empty array ...
0
votes
1answer
415 views

why doesn't my rewrite rule work? (is there something weird with wordpress htaccess?)

My ht access includes: Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_URI} ^/preview/(.*)\-[0-9]+$ RewriteRule ^/preview/(.*)\-[0-9]+$ /$1 [R=301,L] but still when I try to access ...
0
votes
1answer
101 views

mod-rewrite rules grabs “broken permalinks”, too

This is the automatically generated htaccess file of WP using permalinks for the pattern /%year%/%postname%/ (working with http://localhost/BLOG-FOLDER/ yet): <IfModule mod_rewrite.c> ...
3
votes
2answers
2k 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 ...
3
votes
1answer
2k 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: ...
0
votes
1answer
134 views

What is the importance of mod_rewrite?

If my hosting provider does not provide mod_rewrite mode. What thing will get effect on my wordpress? I bought a hosting, they claim they does not provide it. I have installed WP and the web is ...
0
votes
2answers
884 views

Why is home page content not displaying with this rewrite rule?

I am trying to pass a variable from a URL to PHP using mod_rewrite while maintaining standard WordPress functionality. Here's my mod_rewrite rules: RewriteEngine On RewriteBase / RewriteRule ...
0
votes
1answer
202 views

Modifying WP URL handing code?

I am trying to use mod_rewrite and modify WordPress' URL handling to allow for passing variables to PHP from the URL while maintaining "pretty permalink" functionality. (on WP 3.2.1) Something like ...
8
votes
3answers
5k 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 ...
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
164 views

Disable category RSS Feeds on Wordpress blog with PHP

I have a Wordpress powered site and I would like to know how to disable all category based RSS feeds with PHP or even mod-rewrite if possible. Thanks
2
votes
1answer
857 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 ...
0
votes
3answers
806 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', ...
11
votes
1answer
11k 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, ...
0
votes
2answers
2k views

How can I hide that I Use Wordpress (with W3 Total Cache)

For security reasons I don't want it to be obvious that I use Word Press. I use the W3 Total Cache plugin and minify HTML, CSS and JS. I may also use a CDN. Is it possible to modify the W3 Total ...
0
votes
1answer
182 views

1 WordPress, 2 themes, 2 domains, 2 servers

I've got two sites which are hosted on different servers. 1) domain-one.com 2) domain-two.net I installed a WordPress blog on site one at domain-one.com/blog/. I want visitors of domain-two.net to be ...
0
votes
2answers
111 views

Need to capture “keyword” added to the end of the post, even with “pretty permalinks”

I have a script that I wrote some time ago, and have just decided to "port" it into a WP plugin. Everything works great, except for one piece of vital core functionality. The script uses mod_rewrite ...
0
votes
1answer
661 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 ...
1
vote
1answer
413 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 ...
0
votes
3answers
317 views

How to redirect a virtual page (e.g. /blog) to the home page?

I want my to reach my website's main page when entering an url like: http://example.com/blog However, I can't seem to get it to work with a typical rewrite rule: RewriteRule ^/blog$ / I'm always ...
0
votes
1answer
293 views

Already have htaccess but permalink settings not working. Getting 404

I have a .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ...
0
votes
2answers
1k 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
122 views

apache_mod_loaded setting can fubar plugins?

I had a user recently who reported an issue with my plugin's options page not loading. They would click on the "settings" link but only got a blank page. There was also an issue with the rich text ...
3
votes
2answers
1k 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.
0
votes
1answer
477 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
906 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
181 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?
-2
votes
1answer
210 views

Please give me the rewrite rules for my ugly urls

In functions.php I am adding a rewrite rule for this url: http://www.myblog.com/?currentpage=1 http://www.myblog.com/?currentpage=2 And so on... This is the code I use, can u please give me 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" ...
1
vote
2answers
594 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", ...
0
votes
2answers
275 views

Static directories in a WordPress multisite network

I’m planning ahead for a class website, where students will have the choice to either build their pages from scratch, or to use a WordPress multisite install as a CMS. I would like their work to ...
3
votes
2answers
3k 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: ...
4
votes
2answers
310 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 ...
2
votes
2answers
279 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?
3
votes
2answers
2k 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 ...
2
votes
1answer
2k 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 ...
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 ...