Apache Server pseudo-static configuration instructions

Source: Internet
Author: User
Tags website ip

Apache Server pseudo-static configuration description:First Kind
        if the multi-city classification and use of the city level two domain name (multi-city + multi-domain), please modify the Apache configuration file, add the following code to the last line of the configuration file, pay attention to the qibosoft.com to your domain name, the other unchanged.

Multi-city version and uses the city level two domain name pseudo-static rule (multi-city + City Two-level domain name)

<virtualhost *:80>
ServerName test.qibosoft.com
Serveralias *.qibosoft.com
documentroot d:\www\baiye5.com 
<ifmodule mod_ Rewrite.c>
Rewriteengine on
rewriterule ^/([^\/]+)/F ([^\/]+) \. ( [a-za-z0-9]+) $/bencandy\.php\? Fid=$1&id=$2
Rewriterule ^/([^\/]+)/$/list\.php\? Fid=$1
Rewriterule ^/([^\/]+)/([^\/]+]/$/list\.php\? Fid=$2&zone_street=$1
Rewriterule ^ (. *)/(List|bencandy)-([^\.] +)\. ([a-za-z0-9]+) $ $1/$2\.php\?stringid=$3
Rewriterule ^ (. *)/post\. ( html|htm|shtml) $ $1/post\.php
Rewriterule ^ (. *)/post-([0-9]+)-([0-9]+] \. ( [a-z]+] $ $1/post\.php\?fid=$2&city_id=$3
Rewriterule ^ (. *)/post-edit-([0-9]+)-([0-9]+] \. ( [a-z]+] $ $1/post\.php\?job=edit&fid=$2&id=$3
Rewriterule ^ (. *)/post-del-([0-9]+)-([0-9]+] \. ( [a-z]+] $ $1/post\.php\?action=del&fid=$2&id=$3
</IfModule>
</VirtualHost>
        Multi-city classification and use of the city level two domain name (multi-city + multi-domain) in addition to the above methods, there are another way

        put "
Include d:\www\baiye5.com\f\admin/apache.txt
        "Add to the last line of the Apache configuration file. If you use this method, do not use the above method, can not conflict, can only use one of them. If it is a purchased virtual space, the space quotient generally does not allow you to use this, then you can only use the above





The second Kind
        . Multi-city version but not using the city level two domain name and only use the existing domain name (multi-city + non-multi-domain), please modify the Apache configuration file, find the current domain name hz.baiye5.com location put the following code into his line below
pseudo-static rules for multi-city editions Rewriteengine on
Rewriterule ^ (. *)/(List|bencandy)-([^\.] +)\. ([a-za-z0-9]+) $ $1/$2\.php\?stringid=$3
Rewriterule ^ (. *)/([A-z]) ([^\/]+)/([^\/]+)/F ([^\/]+) \. ([a-za-z0-9]+) $ $1/$2$3/bencandy\.php\? Fid=$4&id=$5
Rewriterule ^ (. *)/([A-z]) ([^\/]+)/([^\/]+)/([^\/]+)/$ $1/$2$3/list\.php\? Fid=$5&zone_street=$4
Rewriterule ^ (. *)/([A-z]) ([^\/]+)/([^\/]+)/$ $1/$2$3/list\.php\? Fid=$4
Rewriterule ^ (. *)/post\. (html|htm|shtml) $ $1/post\.php
Rewriterule ^ (. *)/post-([0-9]+)-([0-9]+] \. ([a-z]+) $ $1/post\.php\?fid=$2&city_id=$3
Rewriterule ^ (. *)/post-edit-([0-9]+)-([0-9]+] \. ([a-z]+) $ $1/post\.php\?job=edit&fid=$2&id=$3
Rewriterule ^ (. *)/post-del-([0-9]+)-([0-9]+] \. ([a-z]+) $ $1/post\.php\?action=del&fid=$2&id=$3



Third Kind
        . Single city version, please modify the Apache configuration file, find the current domain name hz.baiye5.com location Insert the following code into his line below
single city version pseudo static rule rewriteengine on
Rewriterule ^ (. *)/(List|bencandy)-([^\.] +)\. ([a-za-z0-9]+) $ $1/$2\.php\?stringid=$3
Rewriterule ^ (. *)/([A-z]) ([^\/]+)/F ([^\/]+) \. ([a-za-z0-9]+) $ $1/bencandy\.php\? Fid=$2$3&id=$4
Rewriterule ^ (. *)/([A-z]) ([^\/]+)/([^\/]+)/$ $1/list\.php\? Fid=$4&zone_street=$2$3
Rewriterule ^ (. *)/([A-z]) ([^\/]+)/$ $1/list\.php\? Fid=$2$3
Rewriterule ^ (. *)/post\. (html|htm|shtml) $ $1/post\.php
Rewriterule ^ (. *)/post-([0-9]+)-([0-9]+] \. ([a-z]+) $ $1/post\.php\?fid=$2&city_id=$3
Rewriterule ^ (. *)/post-edit-([0-9]+)-([0-9]+] \. ([a-z]+) $ $1/post\.php\?job=edit&fid=$2&id=$3
Rewriterule ^ (. *)/post-del-([0-9]+)-([0-9]+] \. ([a-z]+) $ $1/post\.php\?action=del&fid=$2&id=$3
        (Single city edition) and (multi-city + non-multi-domain) that is the second to third case, note: If you want to use advanced pseudo-static, you must first confirm that the first letter of the catalog name of the category column is uppercase. Otherwise, the Web page cannot be accessed.
Description of the IIS server pseudo-static configuration:
        perform each of the following steps strictly:

        go to the IIS Manager Settings screen, create a new site,

        Description: Feel free
    to

        website IP address: default

        Port: Default 80

    The
        main head of this website: leave blank, must be blank, otherwise it is not supported to bind the universal domain name. This is the most critical. and confirm that the host header is not set to a site that is empty, one server can only set one.

        The path is: d:\www\baiye5.com/

        after the creation is complete, download the pseudo-static component and click Download
Http://down.qibosoft.com/rewrite.rar
        , then unzip it into any directory on the C drive,

        then click New Site and right-select the property. Select the ISAPI filter, click Add, the executable is the path of the extracted Rewrite.dll, the filter name is rewrite

        then make sure to save and restart this site.


      Note that the default configuration file after extracting pseudo-static components is multi-city multi-domain, if you are a single city version or other, go to the appropriate directory to copy the replacement DLL directory configuration file.

Apache Server pseudo-static configuration instructions

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.