WordPress and Htaccess

‘RewriteBase /’ is not needed. RewriteBase allows you to change your internal directory structure to something other than what a browser sees. IE: If all your files are in ‘http://mydomain.com/site’, but you wanted ‘http://mydomain.com’ to be the path browsers see, you would use a RewriteBase /site and apache’s mod_rewrite would happily add that substitution for … Read more

Help with a custom rewrite

Your best bet is to use the WordPress rewrite API. No .htaccess required. First, hook into init and add a rewrite endpoint to your permalinks. This tells WordPress that whens some visits /category/post-slug/gallery match the new endpoint rewrite. it also takes care of adding the query variable for you so you don’t have to do … Read more

How to redirect RSS feeds to Feedburner and keep pretty permalinks?

The rules for Feedburner should come before the WordPress rules. And activate the rewrite engine just once. That’s enough. 🙂 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC] RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC] RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds.feedburner.com/ZoomingJapan [R=302,NC,L] RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>

Non WordPress Folder in a WordPress Site

You can revert to the default WordPress rewrite rules. This line already handles checking for existing physical directories: RewriteCond %{REQUEST_FILENAME} !-d Your problem does not lie with WordPress, but with some other problem with your server/htaccess files. You have not provided enough information to solve your problem, but it probably is an issue with file … Read more

Test site pages go to main site

Your htaccess file seems to be a little off. I would suggest the first part of the file should look like the following… <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /testsite/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /testsite/index.php [L] </IfModule> And that you store it in the ‘testsite’ folder not the root.

Redirect within wordpress template/plugin

I think you should take a step back and clarify what you are actually trying to do. Usually with WordPress there is no need to throw around with crazy redirects, virtual pages and file includes. Although you can do all these things (mentioning WP_Rewrite). When all you want is passing parameters to a page all … Read more