Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将php文件的任何请求重写到.htaccess中的主页面_.htaccess_Path_Rewrite - Fatal编程技术网

如何将php文件的任何请求重写到.htaccess中的主页面

如何将php文件的任何请求重写到.htaccess中的主页面,.htaccess,path,rewrite,.htaccess,Path,Rewrite,我想知道如何重写这样的路径www.domain.com/pages/article/ 访问www.domain.com 我这样做了,但是CSS文件也改变了路径 RewriteEngine On RewriteCond %{REQUEST_FILENAME} ^index.php$ RewriteRule . http://www.domain.com/ [L] 为处于单独重写条件的情况添加排除项 RewriteEngine On RewriteCond %{REQUEST_URI} !\.(c

我想知道如何重写这样的路径www.domain.com/pages/article/ 访问www.domain.com

我这样做了,但是CSS文件也改变了路径

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} ^index.php$
RewriteRule . http://www.domain.com/ [L]

为处于单独重写条件的情况添加排除项

RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(css|js|png|jpe?g|gif)$ [NC]
RewriteCond %{REQUEST_FILENAME} ^index.php$
RewriteRule . http://www.domain.com/ [L]

您的问题标题和问题文本不匹配。