.htaccess内容如下:
RewriteEngine On
RewriteBase /
RewriteRule ^cms/5gameweb/statics/css/5g/css/(.*\.css) /combine.php?type=css&files=$1
RewriteRule ^cms/5gameweb/statics/css/5g/js/(.*\.js) /combine.php?type=javascript&files=$1Windows7环境,安装phpStudy集成环境。httpd.conf已经修改了如下内容:LoadModule rewrite_module modules/mod_rewrite.so
Options All
AllowOverride AllAccessFileName .htaccess无法生效。.htaccess跟combine.php文件都放在根目录。不知道还会有什么原因
RewriteEngine On
RewriteBase /
RewriteRule ^cms/5gameweb/statics/css/5g/css/(.*\.css) /combine.php?type=css&files=$1
RewriteRule ^cms/5gameweb/statics/css/5g/js/(.*\.js) /combine.php?type=javascript&files=$1Windows7环境,安装phpStudy集成环境。httpd.conf已经修改了如下内容:LoadModule rewrite_module modules/mod_rewrite.so
Options All
AllowOverride AllAccessFileName .htaccess无法生效。.htaccess跟combine.php文件都放在根目录。不知道还会有什么原因
先确认你的apache能正常工作,然后是最基本的htaccess能工作,然后是rewrite模块单独能工作
然后才是联调....apache的日志里会有详细信息的
舍得根目录 有没问题?
重写模块打开了, httpd.conf也都修改了。我尝试写了个简单的.htaccess,好像没有起作用。
你的$1是否匹配(.*\.css),如果$1为 abc.css应该是可以的,或者你可以 ^cms/5gameweb/statics/css/5g/css/(.*).css