WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

I have my website working from www.xyz.com/wordpress, but customers should not need to type it all. If they just type www.xyz.com it should take them to www.xyz.com/wordpress.

share|improve this question
you can just point your domain to the subdirectory – Zach Lysobey Jun 27 '12 at 17:30
up vote 2 down vote accepted

To redirect http://www.xyz.com/ to http://www.xyz.com/wordpress/ add these rules to your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?xyz.com$
RewriteRule ^(/)?$ wordpress [L]

That answers the first part of your question. The rest of it is totally vague to me.

share|improve this answer
This works. Thanks. I had to clear the browse cache for it to show up. – Siddharth Jun 30 '12 at 5:47
One more quick one, Can I hide the fact that my site is under wordpress folder ? – Siddharth Jun 30 '12 at 5:47
Yes, you'd have to enable "cloaking" — which is a very bad practise, frowned upon by everyone (including Google), otherwise I don't really think so. (I suggest you ask that question on StackOverflow where you might get some very good suggestions as well.) – its_me Jun 30 '12 at 11:20

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.