The most common name of the per-directory settings file for the Apache server. WordPress stores the mod_rewrite configuration for "Pretty Permalinks" here. [url-rewriting] should be used for the WordPress rewrite system in general, [mod-rewrite] when you talk specifically about the Apache module.

learn more… | top users | synonyms (1)

46
votes
7answers
7k views

Best collection of code for your .htaccess file [closed]

We have the Best Collection of Code for your functions.php file thread, so I thought that it might be useful to create a thread for our .htaccess files. AND PLEASE REMEMBER TO ADD ANY OF YOUR OWN ...
11
votes
2answers
681 views

How to create custom 401, 403 and 500 error pages?

When a 404 error is encountered, a 404.php template file can be used to render a custom error message. This is documented in the Template Hierarchy article. My aim is to create custom error pages ...
8
votes
7answers
17k views

Cannot access non-wordpress subdirectories as wordpress overrides them with a 404 error

I refer to this question previously asked and not suitably answered: Wordpress overriding actual subdirectories and also Non "Wordpress" pages/code getting 404 error. I have the same ...
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 ...
8
votes
4answers
1k views

Security and .htaccess

About a month ago I started a WordPress blog on a hosted server related to a hobby. So, I am new to this at present. Since I'm concerned about security, one thing I did was to install the plugin WP ...
8
votes
1answer
3k views

Moving a WP Multisite to a subdirectory

Firstly, I've read a number of posts on this process. However, for various reasons, the process remains difficult to implement or troubleshoot for lack of even abstracted examples, or maybe too ...
7
votes
5answers
5k views

How do I skip wordpress's 404 handling and redirect all 404 errors for static files to 404.html?

How do I skip wordpress's 404 handling and redirect all 404 errors for static files to 404.html? I read and it seems its not possible when using permalinks? The objective is to reduce the server ...
6
votes
2answers
817 views

Multisite htaccess on localhost with WP as an SVN external?

I've mimicked Otto's setup here: http://ottopress.com/2011/creating-a-wordpress-site-using-svn/ and my brief example is below. That tutorial is specific to a single site install, and specifies a ...
5
votes
5answers
4k views

Use a different domain for SSL

long time lurker - first time poster. A client of mine has a website developed in CakePHP, and a wordpress blog installed in the /blog/ directory. Let's say the url of the main domain is ...
5
votes
3answers
4k views

Setting up WordPress with Custom Permalinks and no .htaccess File?

I have a client that strongly prefers to disable .htaccess files because they like to set the Apache configurations themselves. However, they still want SEO-friendly URLs. Is there a way to have ...
5
votes
2answers
838 views

File and directory permissions

I installed latest WordPress 3.5 in my CentOS server. When I tried accessing http://example.com/wp-includes/, I received a listing of the directory: (Index of wp-includes). I added the following code ...
5
votes
1answer
267 views

Clash of the rewrites

I have a category called 'neighborhoods'. I also have child categories within 'neighborhoods' E.G. Lakewood, Highland Park... When I click 'highland park' the url is ...
4
votes
2answers
741 views

How to change or remove .htaccess per plugin?

I am looking for a way to edit or reset the .htaccess for a wordpress site without access to the filesystem, working only with the wp-admin web interface and/or plugins* (see below for the back story ...
4
votes
2answers
215 views

What does a security risk in a plugin look like?

My server was hacked this weekend. By the Russians! Of the 50+ domains on my server, every single one had a hacked .htaccess file which was redirecting search results and a few other things to a ...
4
votes
2answers
168 views

Allow admin login at /admin

I am interested in: how can we change the default login url /wp-admin to /login how can we add another url for login so that both /wp-admin and /login would work I tried to use a custom filter and ...
4
votes
1answer
687 views

Redirect entire website to a single page

I need to redirect a whole WordPress site to a single WordPress page. A sort of maintenance mode, but the redirect has to go to a published WordPress page. Unfortunately, the maintenance page I need ...
4
votes
1answer
1k views

Passing variables through permalink structure

I have a WordPress page which is accessible via /accommodation/. What I want to be able to do is pass in a parameter using the URL - ie going to /accommodation/value1/ would load the same page as ...
3
votes
4answers
854 views

Plugin to edit htaccess file

Is there anyway I can edit my htaccess file without using ftp?
3
votes
1answer
2k views

Rewrite rules in .htaccess get overwritten?

I'm not able to make it work by adding custom rewrite rules into functions.php or adding custom permastructures either. I have this code in my .htaccess that is working fine. # BEGIN WordPress ...
3
votes
3answers
945 views

Options for restricting access to wp-admin

So i've installed a plug-in which allows me to enable two-factor authentication for my users. The problem is that to enable the plug-in i have to log in as that user and enable it via their profile ...
3
votes
1answer
131 views

Isolating WordPress to a subfolder

I'm trying to isolate a wordpress installation on our site to a specific subfolder. I created a folder on our root site named _wp and placed all the wordpress files in there. I added the following ...
3
votes
3answers
105 views

How to Block Access to Standard Login Flow and Comment Flow

I've set up custom flows on my Wordpress blog for login, signup, and commenting. I would like to password protect the standard login flow so only I can use it, and block access entirely to the ...
3
votes
1answer
738 views

Add rewrite rule in plugin: with .htaccess in plugin folder or using WordPress functions

I need add a rewrite rule in my plugin, and distribute it with my code. All works fine if I put the rule in the .htaccess in the WordPress root folder, but I need distribute the plugin with my rule. ...
3
votes
1answer
171 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
466 views

301 Redirects for Changed Permalink Structure & Category Base

I'm redeveloping a site on a fresh WP install. The old site had the following permalink structure: domain.com/CATEGORY/POSTNAME/ The new site has the following permalink structure: ...
3
votes
2answers
644 views

W3 Total Cache Plugin with WP 3 MultiUser [on hold]

I'm having some strange behavior with my W3 Total Cache solution working on my multi-user Wordpress 3 installation. The multi-user is setup to use sub directories, and I'm using all types of caching ...
3
votes
1answer
2k 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

Does WordPress Change the .htaccess File When Updating?

I've just implemented a new WP website, replacing an older hardcoded HTML site. I will be adding 301 redirects in the .htaccess file to point the old URIs to the new WP Permalinks. My questions is, ...
2
votes
4answers
560 views

Permalinks to Custom does not work (out of box)

I have tried to change mode of .htaccess in wordpress folder to 644. Yet, I get Not Found The requested URL /wordpress/features/ was not found on this server. I keep reading about rearranging my ...
2
votes
2answers
485 views

Why should I password protect WP-Admin?

Just occured to me: what's the point of password protecting www.yoursite.com/wp-admin when a user can just type www.yoursite.com/wp-login.php, bypassing the password on /wp-admin? Am I missing ...
2
votes
3answers
841 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 ...
2
votes
5answers
3k views

WordPress permalinks Yahoo hosting(no .htaccess allowed)

I have moved a Wordpress install to a client from sub folder to the root folder. Right now, everything works fine, except for the friendly URLs. I currently have to set the Permalink feature in ...
2
votes
2answers
789 views

multisite htaccess 301 redirects

I've got a multisite sub-domain install with 3 sites on it. 2 of the sites use domain mapping. The main site (id=1) requires several 301's that are old pages from a previous structure such as: ...
2
votes
2answers
608 views

Using WP rather than .htaccess to redirect pages/posts

I run a site with over 100 specific redirects in the htaccess for legacy html files that were subsequently brought into WP. There are also rules for pages within a date range to redirect to the home ...
2
votes
2answers
138 views

External/non-WP rewrite rule without QSA

I'm trying to add a new external/non-WP rewrite rule to my .htaccess but WP keeps adding [QSA,L] to the end of the rule. How do I prevent the QSA part? This line adds the RewriteRule: ...
2
votes
1answer
1k views

Two domains on one Wordpress Installation

I recently changed the base domain on my Wordpress website from http://www.fsdegrees.com to http://www.56degrees.co.uk. I would like to create various of 301 from old domain to new one, but for some ...
2
votes
1answer
291 views

Blog.php or how to display recent posts?

I created a home.php which doesn't display the recent posts in the standard-blog-style. Just have a look at my website to see what I mean. I want to create a link that leads to something like ...
2
votes
1answer
583 views

Issue with using .htaccess to redirect feedburner feed

I am using year/month/post-name permalinks, and also using the download-monitor plugin to handle file downloads. I added rewrite rules to the top of the .htaccess file following the instructions at ...
2
votes
1answer
4k views

Wordpress .htaccess subdirectory problem

I've been having some issues with my Wordpress install allowing me to access subdirectories, specifically a CodeIgniter install at mydomain.com/codeigniter. I know that technically it should work just ...
2
votes
1answer
85 views

How to redirect url requests to https? [closed]

I've searched far and wide for a solution to this and I am sure it's simple but I simply couldn't find a solution. This is the regular wordpress redirect code: <IfModule mod_rewrite.c> ...
2
votes
1answer
209 views

Members area with externally-managed htaccess / htpasswd authentication?

I am looking at the feasibility of converting a client's site from countless hand-built web pages to a WordPress installation. The challenge is that we have a free area and a members-only area. The ...
2
votes
1answer
663 views

Htaccess redirect from '/%postname%.html' to '/%postname%'

I have a Drupal 5.x based travel review site which I'm moving over to Wordpress 3.x (same domain name). The Drupal site is structured like this: www.example.com/travel-guides (these are top-level ...
2
votes
1answer
899 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 ...
2
votes
1answer
2k views

Hijacking the URL for filtering

Right, here's the deal. I've got a loop of which displays news posts, these posts can belong to special categories (not normal categories) and I want to be able to filter by them. If I wasn't too ...
2
votes
1answer
967 views

Change of permalink structure - redirects in htaccess breaks the archive links

When I started with my blog, the permalinks and following structure: http://<domain>/%year%/%monthnum%/%day%/%postname%/ Some time ago, I changed the permalink structure to ...
2
votes
2answers
1k views

When WordPress Does Not Provide an .htaccess File for New Multisite Sites because of CPanel Fantastico Auto-Installer?

I have installed WordPress via an auto-installer and later configured it as multisite. But whenever I create the WordPress site using auto-installer it doesn't give me the .htaccess file by default. ...
2
votes
1answer
73 views

Multisite wordpress and subdomain URL collisions

I have a multisite WordPress installed on a server using a domain, site.com and I have a subdomain setup in WordPress, so subsites are at sub1.site.com, sub2.site.com etc. In addition to this, the ...
2
votes
2answers
2k views

How do I edit the htaccess file to optimize my website?

Hi I have tried to optimize my website energyshop.se for a cpl of days but I cant seem to get it done. This is how my .htaccess looks like: Header unset ETag FileETag None # Hantera och redirecta ...
2
votes
2answers
426 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
3answers
2k views

Using only %postname%

So I see everyone's arguements against using this, but that seems like a huge flaw in Wordpress because a domain name as close to the root is crucial to a site's SEO. I want my site which has rough ...