Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a test site installed on

The problem I have is that if I type in the url I get redirected to

My page for my test site gives me the permalink:

If I click View Page from the page editing screen in the dashboard, I get redirected to instead of being sent to the permalink.

My htaccess file is located in my root folder and is as follows:

# 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]

# END WordPress

ErrorDocument 404 /404.php

<Files delete.php>
order allow,deny
deny from all

Can anyone help?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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]

And that you store it in the 'testsite' folder not the root.

share|improve this answer
but if I move it to my testsite folder, my main site won't function properly. Is it safe to have two htaccess files in two different places? – Sweepster May 28 '12 at 16:39
Yes - as long as they don't contradict one another. – Adam May 29 '12 at 3:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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