Reputation: 11108
Hi i would like to redirect only the domain.com (not www.domain.com) to a subfolder
I tried:
RewriteCond %{HTTP_HOST} ^?YourDomain.com$
RewriteRule ^(/)?$ page [L]
but it gave an internal server error
Upvotes: 0
Views: 41
Reputation: 143946
The 500 internal server error is caused by a bad expression:
# what's this? -----------v
RewriteCond %{HTTP_HOST} ^?YourDomain.com$
Not sure what you're trying to do with that question mark. But you probably want something like this:
RewriteCond %{HTTP_HOST} ^YourDomain.com$ [NC]
The [NC]
makes it case insensitive.
Upvotes: 1