.htaccess 我想将当前页面id重定向到另一个页面id
我想将页面重定向到 我尝试了许多组合,但都没有成功(试试这个.htaccess 我想将当前页面id重定向到另一个页面id,.htaccess,redirect,.htaccess,Redirect,我想将页面重定向到 我尝试了许多组合,但都没有成功(试试这个 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^example.com$ RewriteRule ^(.*)$ http://example.com/products.php?id=WIZ$1 [R=301,L] RewriteCond %{HTTP_HOST} ^www.example.com$ RewriteRule ^(.*)$ http://www
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^(.*)$ http://example.com/products.php?id=WIZ$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^(.*)$ http://www.example.com/newpage.php?nwmd=WIZ/$1 [R=301,L]
此规则适用于您:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=([^&]+) [NC]
RewriteRule ^products\.php$ /newpage.php?nwmd=%1 [R=302,L,NC]