.htaccess 使用htaccess重定向带有查询的特定页面
比如说 mydomain.com/jobresultpage?what=&where=阿肯色州 重定向到 yourdomain.com/jobresultpage?what=&where=阿肯色州 但另一页像 mydomain.com/about.html mydomain.com/contact.html.htaccess 使用htaccess重定向带有查询的特定页面,.htaccess,redirect,.htaccess,Redirect,比如说 mydomain.com/jobresultpage?what=&where=阿肯色州 重定向到 yourdomain.com/jobresultpage?what=&where=阿肯色州 但另一页像 mydomain.com/about.html mydomain.com/contact.html 不重定向..尝试将以下规则添加到位于mydomain.com的根目录中的.htaccess文件中 RewriteEngine On RewriteBase / RewriteCond %{
不重定向..尝试将以下规则添加到位于
mydomain.com的根目录中的.htaccess文件中
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} mydomain\.com$ [NC]
#redirect any request for jobresult to yourdomain
RewriteRule ^jobresultpage$ http://yourdomain.com%{REQUEST_URI} [NC,L,R=301]
确保安装了mod_rewrite,并将覆盖属性设置为读取.htaccess文件。