Take the 2-minute tour ×
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 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?

share|improve this question
add comment

1 Answer

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

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
1  
Yes - as long as they don't contradict one another. –  Adam May 29 '12 at 3:44
add comment

Your Answer

 
discard

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.