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.
39
votes
7answers
3k 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 ...
6
votes
1answer
555 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 ...
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 ...
5
votes
6answers
7k 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 ...
5
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 ...
5
votes
2answers
423 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
2answers
554 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
1answer
224 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
3answers
3k 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 ...
4
votes
2answers
412 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
197 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
147 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
749 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 ...
4
votes
1answer
211 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
5answers
2k 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 ...
3
votes
1answer
93 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
832 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
161 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
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
311 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
604 views
W3 Total Cache Plugin with WP 3 MultiUser
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
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
4answers
358 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
5answers
2k 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 ...
2
votes
2answers
396 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
4answers
2k 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
541 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
4answers
609 views
2
votes
4answers
944 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 ...
2
votes
1answer
494 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
2k 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
119 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
253 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
2answers
567 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
877 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
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
...
2
votes
1answer
756 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
585 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
2answers
258 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
331 views
.htaccess and 500 error, extra character added
I am having a weird problem. Every few days I go to my website and get an "Internal Server Error" - Or 500 error. I go into the .htaccess file of the site and notice it's been altered. One character ...
2
votes
2answers
660 views
wordpress htaccess is hijacking my .mp4 files
I am running wordpress 3.2rc2 multisite.
I inserted a few .mp4 videos into the root of my domain so that I can run a few basic tests with the jw player.
When I try to access the url to the .mp4 ...
2
votes
2answers
5k views
How to change “wp-admin” to something else without search-replacing the core?
for example: foobar.com/wp/edit instead of foobar.com/wp/wp-admin
How would I do that?
I've tried using this in htaccess but it won't work:
##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS
...
2
votes
2answers
968 views
WordPress upgrade now receiving Error 101 (net::ERR_CONNECTION_RESET): Unknown error
We have just updated to WordPress 3.1.3 by following the WP manual install tutorial. Note: This is a Network-enabled (multi-site) install. After uploading the new files, we now get the following error ...
2
votes
2answers
100 views
Wordpress best solution shared theme for consumers and businesses (two url's one instaltion)
What would be the best solution for a wp (cms style) site containing a sub site
for consumers and businesses.
I've made a wp theme and its almost finished. In essence its gives you two choice to ...
2
votes
0answers
134 views
get_permalink returns default link
I hope you can help me.
So i'm using /%postname%/ as permalink structure, and my htaccess is this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /develop/sekai/
...
2
votes
0answers
157 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 ...
1
vote
2answers
270 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, ...
1
vote
3answers
440 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
...
1
vote
1answer
295 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 ...
1
vote
1answer
5k views
htaccess disable Wordpress rewrite rules for folder and its contents
I have another PHP application in a folder named app inside my Wordpress installation, and I need to disable all Wordpress rewrite rules for that folder and it's content. So that when I go to ...
