• 齐博伪静态


    手机版-apache

    <IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteRule ^/([a-z]+)/$ /city/$1/index.php

    RewriteRule ^/([a-z]+)/([^/]+)/f([^/]+).([a-zA-Z0-9]+)$ /city/$1/bencandy.php?Fid=$2&Id=$3

    RewriteRule ^/([a-z]+)/([^/]+)/$ /city/$1/list.php?Fid=$2
    RewriteRule ^/([a-z]+)/([^/]+)/([^/]+)/$ /city/$1/list.php?Fid=$3&zone_street=$2
    </IfModule>

    手机版-nginx

    rewrite ^/([a-z]+)/$ /city/$1/index.php last;
    rewrite ^/([a-z]+)/([^/]+)/$ /city/$1/list.php?Fid=$2 last;
    rewrite ^/([a-z]+)/([^/]+)/([^/]+)/$ /city/$1/list.php?Fid=$3&zone_street=$2 last;
    rewrite ^/([a-z]+)/([^/]+)/f([^/]+).([a-zA-Z0-9]+)$ /city/$1/bencandy.php?Fid=$2&Id=$3 last;

    电脑版-apache

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !^(.*)(.html|.php|.jpg|.gif|.jpeg|.js|.css)$
    RewriteCond %{REQUEST_URI} !^(.*)/$
    RewriteRule ^(.*)$ $1/ [L,R=301]

    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>

    电脑版-nginx

    店铺:

    <VirtualHost *:80>
    DocumentRoot D:xampphtdocsaiye5.com/home
    ServerName test.b2b.baiye5.com
    ServerAlias *.b2b.baiye5.com
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)-htm-(.*)$ $1.php?Rurl=$2
    </IfModule>
    </VirtualHost>

    www绑定

    <VirtualHost *:80>
    SetOutputFilter DEFLATE
    ServerName baiye5.com
    DocumentRoot D:/xampp/htdocs/baiye5.com
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)-htm-(.*)$ $1.php?Rurl=$2
    </IfModule>
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html

    AddOutputFilterByType DEFLATE text/xml

    AddOutputFilterByType DEFLATE text/css

    AddOutputFilterByType DEFLATE text/javascript

    AddOutputFilterByType DEFLATE image/svg+xml

    AddOutputFilterByType DEFLATE image/x-icon

    AddOutputFilterByType DEFLATE application/xml

    AddOutputFilterByType DEFLATE application/xhtml+xml

    AddOutputFilterByType DEFLATE application/rss+xml

    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    </IfModule>
    </VirtualHost>

    <VirtualHost *:80>
    SetOutputFilter DEFLATE
    ServerName www.baiye5.com
    DocumentRoot D:/xampp/htdocs/baiye5.com
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)-htm-(.*)$ $1.php?Rurl=$2
    </IfModule>
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html

    AddOutputFilterByType DEFLATE text/xml

    AddOutputFilterByType DEFLATE text/css

    AddOutputFilterByType DEFLATE text/javascript

    AddOutputFilterByType DEFLATE image/svg+xml

    AddOutputFilterByType DEFLATE image/x-icon

    AddOutputFilterByType DEFLATE application/xml

    AddOutputFilterByType DEFLATE application/xhtml+xml

    AddOutputFilterByType DEFLATE application/rss+xml

    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    </IfModule>
    </VirtualHost>
    <VirtualHost *:80>
    SetOutputFilter DEFLATE
    ServerName test.baiye5.com
    ServerAlias *.baiye5.com
    DocumentRoot D:/xampp/htdocs/baiye5.com
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !^(.*)(.html|.php|.jpg|.gif|.jpeg|.js|.css)$
    RewriteCond %{REQUEST_URI} !^(.*)/$
    RewriteRule ^(.*)$ $1/ [L,R=301]

    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>

    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html

    AddOutputFilterByType DEFLATE text/xml

    AddOutputFilterByType DEFLATE text/css

    AddOutputFilterByType DEFLATE text/javascript

    AddOutputFilterByType DEFLATE image/svg+xml

    AddOutputFilterByType DEFLATE image/x-icon

    AddOutputFilterByType DEFLATE application/xml

    AddOutputFilterByType DEFLATE application/xhtml+xml

    AddOutputFilterByType DEFLATE application/rss+xml

    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    </IfModule>
    </VirtualHost>

    备份:

    <VirtualHost *:80>
    DocumentRoot /www/web/baiye5_com/public_html
    ServerName www.baiye5.com
    ServerAlias www.baiye5.com
    ErrorDocument 400 /errpage/400.html
    ErrorDocument 403 /errpage/403.html
    ErrorDocument 404 /errpage/404.html
    ErrorDocument 503 /errpage/503.html
    include /www/wdlinux/wdcp/rewrite/www_baiye5_apache.conf
    php_admin_value open_basedir /www/web/baiye5_com:/tmp
    <IfModule mod_deflate.c>
    DeflateCompressionLevel 7
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php
    AddOutputFilter DEFLATE css js html htm gif jpg png bmp php
    </IfModule>
    </VirtualHost>
    <Directory /www/web/baiye5_com>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

  • 相关阅读:
    ASP.NET Core 问题排查:Request.EnableRewind 后第一次读取不到 Request.Body
    解决 AutoMapper ProjectTo 不起作用的问题
    解决 ASP.NET Core 自定义错误页面对 Middleware 异常无效的问题
    ASP.NET Core 从 gitlab-ci 环境变量读取配置
    终于解决 xUnit.net 测试中无法输出到控制台的问题
    ASP.NET Core 新建线程中使用依赖注入的问题
    前端回顾:2016年 JavaScript 之星
    前端工程师和设计师必读文章推荐【系列三十五】
    AsciiMorph
    Notyf
  • 原文地址:https://www.cnblogs.com/chenjian/p/6904975.html
Copyright © 2020-2023  润新知