Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

the WordPress rewrite rules are like this:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

now i would like to add a new rule that would deliver for the url /test the same content as the root page, but without doing an actual redirect.

i have tried:

RewriteRule ^test/$ /index.php [PT]

but that does seem to give test as a parameter to index.php, since i get a page not found error.

share|improve this question
up vote 2 down vote accepted

There's nothing wrong with your new rule. Are you trying to access '' or are you trying to do ''?

The rule you have will only match for '' and not ''.

If you wanted it to do all, then change it to:

RewriteRule ^test/$ /index.php [PT]
RewriteRule ^test/.*$ /index.php [PT]
share|improve this answer
i am trying to access /test/. it seems it works if i specify another file like a.php, but not with index.php. i guess it is a WordPress problem. – memical Jul 31 '12 at 21:40

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.