First: Enable rewrite and. htaccess settings
Rewrite settings : Locate the Apache configuration file httpd.conf file, find: #LoadModule rewrite_module modules/mod_rewrite.so Remove the previous # number.
Instead: LoadModule rewrite_module modules/mod_rewrite.so
. htaccess Settings :
Windows inside this setting: Accessfilename htaccess
Linux inside this setting: Accessfilename. htaccess.
Linux has one more point in front of the file name in Windows. If you do not find accessfilename yourself at the back of the httpd.conf file Add.
The second type: allowoverride settings.
The default allowoverride is allowoverride none. Change this to: allowoverride all. If multiple virtual directories are configured to be opened in each directory, the instance:
<virtualhost *:80>
DocumentRoot "D:svntracsvnsvnrepositorywwwroot"
ServerName 127.0.0.1:80
DirectoryIndex index.html index.htm index.php index.shtml
<directory "D:svntracsvnsvnrepositorywwwroot" >
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>
<virtualhost 127.0.0.2:80>
DocumentRoot "d:/svntrac/svn/svnrepository/www/"
ServerName 127.0.0.2:80
DirectoryIndex index.html index.htm index.php index.shtml
<directory "d:/svntrac/svn/svnrepository/www/" >
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>
The third type: Options settings
The default setting is: Options Indexes followsymlinks
If you change to the following settings, an error occurs
Options Indexes followsymlinks multiviews includes (error)
If you want to enable, directory browsing MultiViews
Server side contains includes (<!– #include virtual= "top.htm" –>)
For simplicity it can be set to: Options all
The first two are common in the configuration of errors, the third is generally rare, finally remind everyone, remember to change the configuration file after the server must be restarted AH. Have questions, leave a message, or listen to the meager.
I tried to do not above, and finally found that the rewrite rules in front of the extra slash
Rewriteengine on
Rewriterule ^index.html$/index.php [L]
Change it to the bottom, OK.
Rewriteengine on
Rewriterule ^index.html$ index.php [L]
. htaccess file cannot be pseudo-static workaround