I transferred my WordPress site to static HTML website, but some other website have a link to my old WordPress site http://mysite.com/?page_id=1103. I want to redirect all traffic from that URL to new URL which is http://mysite.com/myfolder/mypage.html, but my redirect in .htaccess file doesn't work (Redirect 301 /?page_id=1234 http://mysite.com/myfolder/mypage.html) because of the query string. Maybe someone can help me with "mod_rewrite" to create the right code in .htaccess file. Thanks
Try to use this code in your .htaccess file: RewriteEngine on RewriteCond %{QUERY_STRING} ^?page_id=1234$ [NC] RewriteRule ^/?$ http://mysite.com/myfolder/mypage.html [R] Code (markup): Or change the value of WordPress Address (URL) or Site Address (URL) on your WP Settings > General to "http://mysite.com/myfolder" or "http://mysite.com/myfolder/".