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?

1 Answer 1


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.

  • 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, 2012 at 16:39
  • 1
    Yes - as long as they don't contradict one another.
    – Adam
    May 29, 2012 at 3:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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