RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule /from-([a-z]*)\.html$ /detail\.php\?d=$1
http.conf里的
LoadModule rewrite_module modules/mod_rewrite.so 配置过了NameVirtualHost *:88
<VirtualHost *:88>
ServerName *
DocumentRoot "D:/APMServ5.2.6/APMServ5.2.6/www/test"
<Directory "D:/APMServ5.2.6/APMServ5.2.6/www/test">
Options All
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
但是rewrite规则不起作用.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule /from-([a-z]*)\.html$ /detail\.php\?d=$1
http.conf里的
LoadModule rewrite_module modules/mod_rewrite.so 配置过了NameVirtualHost *:88
<VirtualHost *:88>
ServerName *
DocumentRoot "D:/APMServ5.2.6/APMServ5.2.6/www/test"
<Directory "D:/APMServ5.2.6/APMServ5.2.6/www/test">
Options All
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
但是rewrite规则不起作用.
解决方案 »
- 求助,汉字采集出错
- PHP怎么把img标签从一段html代码中提取出来
- 碰到个事儿,二维数组的,很有意思
- 遇到一个PHP连接MySQL问题,PHP支持MySQL,但是总是提示Access denied for user 'IUSR_TOMC-YKJ'@'localhost' (using password
- php类的应用 帮忙修改下 出错呢??!!!
- $_post无法得到post过来的数据!
- 设计表的时候以用户名做关联而不是以用户ID,这种方法可取么?
- 函数当被调用后的 目录路径问题。
- session中数组注册以及使用的问题(购物车中用到的)
- 为什么这个类只能加入一个子数据
- php中,显示时如何将同一个人同一天的两条记录合为一条,将签退时间和签到时间显示在同一行?
- 如何在PHP建立动态二维数组并赋值
RewriteCond $1 !^(index\.php|news|x\.html|match|terror|through|love-story|imaginary-love|terror|web|history|campus|metropolis|user_guide|dota|sitemap|ucenter|discuz|game|war3|skin|sc|images|favicon\.ico|inc|d|cms|image|data|static|UploadThumbs|upload|uploadfiles|demo\.php|info\.php|demo\.xml|images_front|system|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
试试RewriteRule from-([a-z]*).html$ detail.php?d=$1
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule from-([a-z]*)\.html$ detail\.php\?d=$1以前是不是放在.conf文件里的?这样试试呢?