apache - .htaccess not redirecting all traffic -
im hoping 1 can help.
im using .htaccess redirect traffic website while work on ... works great main index page, else results in redirection getting appened
for instance, www.website.com works perfect , gets redirected www.google.com ... when go www.website.com/wp-admin ... gets redirected www.google.comwp-admin
any appreciated.
it should redirect here -> http://www.myredirect.com/show.aspx?sh=ku14
here line
rewriterule ^(.*)$ http://www.myredirect.com/show.aspx?sh=ku14$1 [r=301,l]
you asked append url redirected url $1
. remove it
rewriterule ^(.*)$ http://www.myredirect.com/show.aspx?sh=ku14 [r=301,l]
note: if trying redirect maintenance use 307
temporary redirect. 301
permanent redirect , browser may not visit original site later, once finish update.
quote wiki
301 moved permanently
, future requests should directed given uri.[2]307 temporary redirect (since http/1.1)
in case, request should repeated uri; however, future requests should still use original uri.[2] in contrast how 302 historically implemented, request method not allowed changed when reissuing original request. instance, post request should repeated using post request.[11]
Comments
Post a Comment