Search code examples
wordpressapache.htaccesspermalinks

/wp-admin/ working but no other permalinks are working due to .htaccess setup confusion


I need to redirect the homepage to index.html and /business to /business/index.html so I've modified the rewrite rules written in by WordPress by default:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteRule ^business/ - [L]
RewriteRule ^index\.php$ - [L]
RewriteRule ^$ /index.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

If I remove my rules permalinks work again but I really need these rules in... /wp-admin still works just fine.

Anyone have any ideas?


Solution

  • Why do you want to mess with .htaccess rewrite rules?

    You can simply use this on the the default wordpress php page:

    Header('Location: index.html');