Steps for Apache pseudo-static configuration on Windows2003 server

Source: Internet
Author: User

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.

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.