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.

Hi all I want to use sub domain for my taxonomy like that :

http://taxonomy.domain.com/apple map to http://www.domain.com/taxonomy/apple

I add this to my vhost

    RewriteCond %{HTTP_HOST}    ^taxonomy\.domain\.com [NC]
    RewriteRule ^/(.*)$        http://www.domain.com/taxonomy/$1 [L]

And add a wildcard to my dns configuration.

The redirection works but I want to use only rewrite but not redirection. So I want to use the target page but still have the subdomain url.

So taxonomy.domain.com/apple is map but not redirect to the taxonomy url

Any help?

thanks in advance

share|improve this question
    
I don't thin you can when you are changing domains. You are moving people from taxonomy. to www. If this was possible then I could rewrite cake.something.net to paypal.com for example –  Barry Carlyon Jul 15 '12 at 17:29
    
This is possible. You can actually do anything you wish with rewrites. @BarryCarlyon You can rewrite a custom URL to paypal.com using proxypass or a simple htaccess rewrite. The site won't function properly, but it will display, though not advisable. –  Brian Fegter Jul 17 '12 at 5:55
1  
I think this is a question that should be asked in stack overflow as this relates more to Apache than WordPress. –  Brian Fegter Jul 17 '12 at 5:57
add comment

1 Answer 1

Do you have the line Options +FollowSymlinks defined in the .htaccess file before your rewrite rules?

If so, remove it. If not, add it.

share|improve this answer
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.