Home > Backend Development > PHP Tutorial > 关于伪静态的写法,帮忙

关于伪静态的写法,帮忙

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:48:54
Original
871 people have browsed it

关于伪静态的写法,请教高手帮忙
我使用apache作为服务器,安装wordpress,

现在写了一个自定义的链接

做出来是:http://127.0.0.1/wordpress/go/index.php?pid=399
但我想变为http://127.0.0.1/wordpress/go/399.html

听说要写伪静态,请高手帮忙哈


------解决方案--------------------
RewriteRule ^wordpress/go/([0-9]+)\.html$ wordpress/go/index.php?pid=$1 [L]

------解决方案--------------------
不要做无谓的尝试!
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
将所有的访问都定向到了 index.php

这是他设计好的伪静态运行方式,不能改动
既然你要用 WordPress ,就得按他的规矩来
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template