0

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]
</IfModule>

# END WordPress

ErrorDocument 404 /404.php

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

Can anyone help?

1 Answer 1

2

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]
</IfModule>

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

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

Your Answer

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

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