& Nbsp; after the PHP5.2 problem is solved, WordPress is now installed. After installation, there is no problem. Next, configure WordPress and enable the static URL link. Then, manually edit the. htaccess file and copy the code generated by WordPress. As a result, click a link to directly 404 NotFound. Sorrow
After the PHP 5.2 problem is solved, WordPress is now installed. After installation, there is no problem. Next, configure WordPress and enable the static URL link. Then, manually edit the. htaccess file and copy the code generated by WordPress.
The result is 404 Not Found directly by clicking a link. Tragedy, it seems that there is a problem with Apache Rewrite, and the. htaccess file is completely ignored! After checking the Apache module, we found that the Rewrite module is enabled. it seems that the configuration in the httpd. conf file is a bit faulty. Recall that previously, configuring Rewrite in Ubuntu Server also enables the attribute "All" called "AllowOverride" to correctly enable Rewrite, this is the problem.
Enter:
# Vim/etc/httpd/conf/httpd. conf
Find your VirtualHost settings.
AllowOverride All
The Directory/"/" in the above section is your www path, for example, put it in the "/var/www/html" path and write it as" ", And so on. Restart the httpd service after saving:
#/Etc/init. d/httpd restart
Go to WordPress again and click a link! Solve the problem. It seems that this "AllowOverride" is not simple! So I searched the internet and found that this is the key point to control. htaccess. In addition to the need to enable Rewrite in Apache and correct settings. in addition to the htaccess file name, you also need to configure AllowOverride of the Directory, because the value of AllowOverride is None by default, which will be completely ignored. htaccess file.
In addition to the values 'all' and 'none', AllowOverride also has many values whose meanings are as follows:
AuthConfig
Commands related to authentication and authorization are allowed (AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, AuthName, AuthType, AuthUserFile, Require, and so on ).
FileInfo
Commands that control document types are allowed (DefaultType, ErrorDocument, ForceType, LanguagePriority, SetHandler, SetInputFilter, SetOutputFilter, Add * and Remove * commands in mod_mime) command (Header, RequestHeader, SetEnvIf, delimiter, BrowserMatch, CookieExpires, CookieDomain, CookieStyle, delimiter, CookieName), commands in mod_rewrite (RewriteEngine, RewriteOptions, RewriteBase, callback, rewriteRule) and Action commands in mod_actions.
Indexes
Allows the use of commands that control directory indexes (AddDescription, AddIcon, AddIconByEncoding, AddIconByType, DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName, etc ).
Limit
Allows the use of commands (Allow, Deny, Order) that control access to the host ).
Options [= Option,...]
Allows you to use commands (Options and XBitHack) that control the functions of a specified directory ). You can add a comma-separated (no space) Options list after the equal sign to control the Options that can be used by the Options command.
In this case, with All and None, there are seven optional values. It seems that we have gained a lot of insights! Similar problems will occur in the future. in any Linux system, I can easily find the problem!