Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a website (http://koereskole-svendborg.dk/) - as default it did not have www in front of the url and I tested some different htaccess such the one below with no success. I did not change any setting in WordPress where it is set to not have www in front of the urls.

After testing the htaccess (frontpage worked but subpages got a 404 error) below I put in the original htaccess - see below. But now I cant login on my WordPress installation anymore - what do I do to login and to solve the htaccess issue?

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.koereskole-svendborg.dk [NC]
RewriteRule ^(.*)$ http://koereskole-svendborg.dk/$1 [R=301,nc]

Original:
# 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 WordPress
share|improve this question

closed as too localized by toscho Mar 16 at 23:29

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

Have you tried using the default .htaccess?

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.