我在几个站点中都拥有此功能,并被困在站点根目录下的.htaccess
文件中:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /rewrite.cfm?rewrite_path=$1 [L,R,QSA]
我可以在httpd.conf
文件中执行此操作吗?如果可能,我宁愿避免使用.htaccess
。
也接受其他建议。在Centos 7上使用Apache 2.4