Forum Moderators: phranque
This is a temporary move just so i can post on my weblog about the design of the site and such. When I’m done designing I would switch back to the top level.
Any help would greatly be appreciated.
Oh and I’ve tried numerous combinations to no avail. Here is my current .htaccess
#temporary redirect homepage to weblog
RewriteCond %{REQUEST_URI}!^/weblog/
RewriteCond %{HTTP_HOST} domain.com$
RewriteRule ^(.*)$ weblog/$1 [L]
Thanks!
[domain.com...]
[domain.com...]
[domain.com...]
[domain.com...]
Thanks for your help
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(index\.(php¦html?))?\ HTTP/
RewriteCond ^(index\.(php¦html?))? http://www.example.com/ [R=301,L]
DirectoryIndex index.html
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(index\.html)?\ HTTP/
RewriteCond ^(index\.html)?$ http://www.example.com/ [R=301,L]
The construct shown above, testing THE_REQUEST, is necessary to prevent an 'infinite loop' when redirecting "index.html" to "/". This loop would normally occur because, in effect, DirectoryIndex rewrites "/" to "index.html". If the THE_REQUEST RewriteCond wasn't used, then the rule would redirect "index.html" to "/" and DirectoryIndex would immediately rewrite it back. If the rule wasn't qualified to look at only the original client request, then this would lead to a loop which would end only when the client (e.g. browser) or server reached its maximum redirection limit.
Note that THE_REQUEST contains the entire client request header, as seen in your raw server logs. For example, it might contain
GET /index.html HTTP/1.1or
PROPFIND /index.html HTTP/1.1
Change all broken pipe "¦" characters above to solid pipe characters before use; Posting on this forum modifies the pipe characters.
Jim