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 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
2  
you can just point your domain to the subdirectory –  Zach L Jun 27 '12 at 17:30

1 Answer 1

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

 
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.