Welcome to WebmasterWorld Guest from 220.127.116.11
RewriteRule ^(.*)$ [123.com...] [R=permanent,L]
So which one is correct?
Be aware that the code you found has a bug. The first two directives are reversed. The code order must be:
RewriteRule ^(.*)$ http://www.123.com/$1 [R=301,L]
No, it might mean that in order to avoid the 403-Forbidden error, it is necessary to execute one of your RewriteRules. If neither FollowSymLinks nor SymLinksIfOwnerMatch is enabled, then mod_rewrite is disabled, so your rule does not get executed, and the result is a request for a disallowed file or directory.
> I tried to switch these two lines, no effect. Do I still need to update all my .htaccess files?
No, if it's not broken, don't fix it! I need to remind myself occasionally of a fact about Apache that is not obvious: Directives in .htaccess are not processed in the order that they appear. They are processed in the order that their corresponding modules execute, as set by the server config. This can vary, but the order of execution of some common modules is usually:
And it appears that core Apache directives (such as 'Options') execute first of all.
Each of these modules takes its turn going through your .htaccess file and executing the directives that it understands. So the order of directives in .htaccess cannot be used to control anything other than the order of execution *among directives processed by the same module*.