The problems that should be paid attention to in htaccess application

Source: Internet
Author: User

But I changed the love of the wall under the root directory of the htaccess configuration of the 404 page refers to the 404.html, but is not to achieve 404 page jump it? Isn't the htaccess 404 configuration Unavailable? But straight back to the love of the Wall home (http://www.111cn.net) ~ Such a son heard on the SEO is very bad, search engines will not include the homepage of the site, so the internet Google reason, find a half-day reason also did not find the root of the problem ~

Then I found the problem in an obscure article ~
The article is written to the following content


Apache must look up the. htaccess file in all superior directories to make all valid directives work (see the instructions in effect), so if you request a page in/www/htdocs/example, Apache must look for the following files:

The code is as follows Copy Code
/.htaccess
/www/.htaccess
/www/htdocs/.htaccess
/www/htdocs/example/.htaccess

A total of 4 additional files are accessed, even if they do not exist. (Note that this may only be due to the use of the root directory "/". htaccess, although this is not much. )
I wonder if the htaccess in my WordPress directory has affected the htaccess of the wall of love? Because my love wall is placed in the WordPress directory, that is, wordpress/lovewall,wordpress htaccess file address is wordpress/.htaccess, and love wall for wordpress/lovewall/ . htaccess, so the two are merged, and when accessing other pages, the overriding directory rules in WordPress are enabled by default. I rewrote the WordPress root directory under the htaccess, really so ~ suddenly! But how to solve it??

Start thinking about it. Lovewall folder from the WordPress folder to move out, so WordPress htaccess file is not cited, but this will also be reconfigured Lovewall files, but also to reparse, the cost is too high, do not like ~

Later, I carefully think that is not the htaccess of WordPress file and Love wall htaccess files are merged? Why not turn rewriteengine off in the htaccess of the wall of love? So I changed the htaccess file of Love wall to the following content

The code is as follows Copy Code

Rewriteengine off

ErrorDocument 404/404.html
ErrorDocument 403/404.html
Options-indexes

Problem solved successfully!
P.S.: First, WordPress htaccess default Existence column directory problem, you can use options-indexes to solve this problem; two, htaccess references are referenced from the htaccess of the folder, both (or more) combined

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.