php伪静态怎么弄啊,有谁会具体一些,谢谢
解决方案 »
- share 一段小说的采集代码。
- 求助php+mysql如何运行。我是新手
- discuz.语言包切换 (中英双语切换)
- 關於mysql 數字帶小數
- 为什么我这一段程序在当前页面可以得到值。第二个页面就不行?
- win2003+iis环境,asp可以正常访问,php却不能访问
- zend Studio和SVN結合出錯。
- 有没有可以抓取用disuz模版搭建论坛的网页的工具?
- phpmailer 错误 called mail() without being connected
- 在Mac电脑上,新打开一个tab页,$_SERVER['HTTP_REFERER']不能用吗?
- phpexcel读取合并单元格的值
- php用open falsh chart绘图问题
RewriteEngine On
RewriteRule ^index.html$ index.php
</IfModule>
保存名为.htaccess的文件放根目录localhost/index.htm=ocalhost/index.php
...
AllowOverride ALL
...
</Directory>
这个是apache的URL重写nginx也基本上差不多
AddType application/x-httpd-php .php
在这后面加一个 .htm就可以了,像这样:
AddType application/x-httpd-php .php .htm如果是nginx服务器
在nginx.conf里找到
location ~ .*\.(php|php5)?$
改成
location ~ .*\.(php|php5|htm)?$
index.htm服务器会当php解析的!如果你要保留服务器文件名为index.php,当路径又要是index.htm,那就得用重写了!
apache的配置方法:
http://hi.baidu.com/tianliao1988/blog/item/a4ae32cea1d01e35f8dc61d0.htmlnginx的配置示例:location ~ .*\.(htm)?$
{
root /var/www/html/news;
rewrite /(.*\.php?) /$1 break;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}