Structure of .htaccess file in wordpress
- سُلَيْمَان بْن دَاوُوْد

- Jan 5, 2025
- 1 min read
When we are placing our word press site in root directory of server then .htaccess looks like
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPressWhen we are placing word press in a sub directory then .htaccess looks like this
suppose my sub folder name is barraid
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /barraid/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /barraid/index.php [L]
</IfModule>
# END WordPress
Comments