.htaccess - Redirect 301 issue -


i´m trying 301 redirect in .htaccess following lines:

options +followsymlinks rewriteengine on redirect 301 /oldpage http://www.myhomepage.de/newpage/ 

the problem is, redirected url looks this:

http://www.myhomepage.de/newpage/?it=oldpage 

and naturally causes 404 on site. know, problem be? bunch!

this should work you:

rewriterule ^oldpage$ newpage? [r=301,l] 

the question mark @ end of destination tell use blank query string.

the above assume pages on same domain. if you're moving domain, should trick:

rewriterule ^oldpage$ http://newdomain.tld/newpage? [r=301,l] 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -