jamalfree Active member Jun 27, 2016 #1 redirect all website to one page htaccess 301 i use this but didn't work perfectly HTML: RewriteRule ^(.*)$ http://www.example.com/ [R=301,L]
redirect all website to one page htaccess 301 i use this but didn't work perfectly HTML: RewriteRule ^(.*)$ http://www.example.com/ [R=301,L]
Jake Bunce Well-known member Jun 27, 2016 #2 Need more info... but if that rule is in the web root (same as the redirect target) then it will cause infinite redirection. Try this to avoid that: Code: RewriteRule ^$ - [S=1] RewriteRule ^(.*)$ http://www.example.com/ [R=301,L] Upvote 0 Downvote
Need more info... but if that rule is in the web root (same as the redirect target) then it will cause infinite redirection. Try this to avoid that: Code: RewriteRule ^$ - [S=1] RewriteRule ^(.*)$ http://www.example.com/ [R=301,L]
jamalfree Active member Jun 27, 2016 #3 tanks jack alot but when redirecting i get in url http://www.example.com/?do=markread&markreadhash=1361723109-57d4531788b15d38a3b70198897c30d29d0ff9f1 or like this http://www.example.com/external.php?type=RSS2 but i want onlyurl clean http://www.example.com/ without last target in url Last edited: Jun 27, 2016 Upvote 0 Downvote
tanks jack alot but when redirecting i get in url http://www.example.com/?do=markread&markreadhash=1361723109-57d4531788b15d38a3b70198897c30d29d0ff9f1 or like this http://www.example.com/external.php?type=RSS2 but i want onlyurl clean http://www.example.com/ without last target in url
Jake Bunce Well-known member Jun 28, 2016 #4 Oh Code: RewriteRule ^(.*)$ http://www.example.com/? [R=301,L] The "?" will empty the query string on redirect. Upvote 0 Downvote
Oh Code: RewriteRule ^(.*)$ http://www.example.com/? [R=301,L] The "?" will empty the query string on redirect.