Heim > Artikel > Backend-Entwicklung > urlrewrite 写法,不常用,请问
urlrewrite 写法,不常用,请教
我要输入http://www.aa.com 跳转到 http://www.aa.com/quote
怎么写??
要求一定要用url重写
不能在index.php文件里header(location:)
------解决方案--------------------
RewriteEngine on RewriteCond %{HTTP_HOST} www.aa.com$ RewriteCond %{REQUEST_URI} !^/quote/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /quote/$1 <div class="clear"> </div>