That works. What's annoying is that www.monkey-robot.com/blog also shows the front page of the blog, which means the front page exists at 2 different URLs. This is bad. So I want to redirect www.monkey-robot.com/blog to the root URL.
This is my current .htaccess file for doing so:
CODE
ErrorDocument 403 /404.html
ErrorDocument 404 /404.html
Options -Indexes
#### Rewrite Rules ####
RewriteEngine On
# Rewrite monkey-robot.com to www.monkey-robot.com
RewriteCond %{HTTP_HOST} ^monkey-robot\.com$
RewriteRule ^(.*)$ http://www.monkey-robot.com/$1 [R=301,L]
RewriteRule ^$ /blog/ [L]
RewriteRule ^feeds/blog/?$ /feeds/blog/atom.xml [L]
ErrorDocument 404 /404.html
Options -Indexes
#### Rewrite Rules ####
RewriteEngine On
# Rewrite monkey-robot.com to www.monkey-robot.com
RewriteCond %{HTTP_HOST} ^monkey-robot\.com$
RewriteRule ^(.*)$ http://www.monkey-robot.com/$1 [R=301,L]
RewriteRule ^$ /blog/ [L]
RewriteRule ^feeds/blog/?$ /feeds/blog/atom.xml [L]
Right after the RewriteRule ^$ /blog/ [L], I tried adding this:
CODE
RewriteRule ^blog/?$ / [R,L]
But that gave me an error with "infinite redirects", probably because of the line before it (even though I thought it shouldn't). So I did this instead:
CODE
RewriteRule ^blog/?$ http://www.monkey-robot.com/ [R,L]
But then I got the following Apache error: Invalid command '[R,L]', perhaps misspelled or defined by a module not included in the server configuration But I'm pretty sure the syntax is correct.
Any ideas?