What is WordPress default Apache .htaccess rules?

Apache: What is WordPress default Apache .htaccess rules?

Messed up your WordPress .htaccess file? Here is the default one for most configurations:

  1. # BEGIN WordPress
  2. <IfModule mod_rewrite.c>
  3. RewriteEngine On
  4. RewriteBase /
  5. RewriteRule ^index\.php$ - [L]
  6. RewriteCond %{REQUEST_FILENAME} !-f
  7. RewriteCond %{REQUEST_FILENAME} !-d
  8. RewriteRule . /index.php [L]
  9. <\/IfModule>
  10.  
  11. # END WordPress

webdevetc profile pic
webdevetc

I am a 29 year old backend web developer from London, mostly focusing on PHP and Laravel lately. This (webdevetc.com) is my blog where I write about some web development topics (PHP, Laravel, Javascript, and some server stuff). contact me here.



More...


Comments and discussion about What is WordPress default Apache .htaccess rules?

Found this interesting? Maybe you want to read some more in this series?

Or see other topics in the Apache language

Or see other languages/frameworks:
PHP Laravel Composer Apache CentOS and Linux Stuff WordPress General Webdev and Programming Stuff JavaScript
Or see random questions

How to force SSL in Apache's .htaccess?

What is Bubble sort, and how to write an implementation of it in PHP

How to review blog posts (written by other users) before they get published on your WordPress blog?

How to get the first row that matches some where queries, or create it if it doesn't exist (in Laravel's Eloquent)?

What kind of database field type should you (normally) use for foreign keys?

How can you check if a variable is alphanum (alphanumeric, letters and numbers only) in PHP?

What are the SPL Iterators in PHP?

What does 'final class' and 'final function' (final method) mean in PHP?

How to do comments in Blade files?

How to block access to certain referrers in Apache using .htaccess