WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a test site installed on www.mydomain.com/testsite.

The problem I have is that if I type in the url www.mydomain.com/testsite/about I get redirected to www.mydomain.com/about.

My page for my test site gives me the permalink: www.mydomain.com/testsite/about

If I click View Page from the page editing screen in the dashboard, I get redirected to www.mydomain.com/about 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
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.