1. Check whether Apache supports mod_rewrite.
Use the phpinfo () function provided by php to view the environment configuration, and use Ctrl + F to find "Loaded Modules ",
All modules enabled by the apache2handler are listed. If "mod_rewrite" is included, it is supported and you do not need to continue setting.
If "mod_rewrite" is not enabled, open the httpd. conf file in the directory "/apache/conf,
Use Ctrl + F to find "LoadModule rewrite_module" and delete.
If not found, go to the "LoadModule" area and add
"LoadModule rewrite_module modules/mod_rewrite.so" (an exclusive row is required ),
Restart the apache server.
2. Enable the apache server to support. htaccess
Modify the httpd. conf file
<Directory "D:/web">
</Directory>
Inside
Options FollowSymLinks
AllowOverride None
Change
Options FollowSymLinks
AllowOverride All
The following is the pseudo-static setting text of Discuz:
# Enable RewriteEngine mode
RewriteEngine On
# Do not modify Rewrite system rules
RewriteRule ^ archiver/(fid | tid)-[0-9] + \. html) $ archiver/index. php? $1
RewriteRule ^ forum-([0-9] +)-([0-9] +) \. html $ forumdisplay. php? Fid = $1 & page = $2
RewriteRule ^ thread-([0-9] +)-([0-9] +)-([0-9] +) \. html $ viewthread. php? Tid = $1 & extra = page \ % 3D $3 & page = $2
RewriteRule ^ space-(username | uid)-(. +) \. html $ space. php? $1 = $2
RewriteRule ^ tag-(. +) \. html $ tag. php? Name = $1
The following is the pseudo static setting text of Phpwind:
RewriteEngine On
RewriteBase/
RewriteRule ^ (. *)-htm-(. *) $ 1.php? $2
RewriteRule ^ (. *) simple/([a-z0-9 \ _] + \. html) $1/simple/index. php? $2
There are also many different rules. If you want to develop pseudo-static rules for your site, you must be familiar with the website structure and regular expressions.