Zapp Posted September 10, 2012 Share Posted September 10, 2012 Hi I redirected my homepage from http://zlatydrak.sk to http://www.zlatydrak.sk by adding following code to my .htaccess: Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^zlatydrak.sk [nc] rewriterule ^(.*)$ http://www.zlatydrak.sk/$1 [L,R=301] I checked whether my webpage http://www.zlatydrak.sk was properly redirected or not here http://www.ragepank....redirect-check/ and I got following report http://www.zlatydrak.sk returns a HTTP/1.1 303 See Other response http://zlatydrak.sk returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.php returns a 301 (permanent) redirect http://zlatydrak.sk/index.php returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.htm returns a 301 (permanent) redirect http://zlatydrak.sk/index.htm returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.html returns a 301 (permanent) redirect http://zlatydrak.sk/index.html returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.shtml returns a 301 (permanent) redirect http://zlatydrak.sk/index.shtml returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.asp returns a 301 (permanent) redirect http://zlatydrak.sk/index.asp returns a 301 (permanent) redirect http://www.zlatydrak.sk/default.asp returns a 301 (permanent) redirect http://zlatydrak.sk/default.asp returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.aspx returns a 301 (permanent) redirect http://zlatydrak.sk/index.aspx returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.cfm returns a 301 (permanent) redirect http://zlatydrak.sk/index.cfm returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.pl returns a 301 (permanent) redirect http://zlatydrak.sk/index.pl returns a 301 (permanent) redirect http://www.zlatydrak.sk/default.htm returns a 301 (permanent) redirect http://zlatydrak.sk/default.htm returns a 301 (permanent) redirect Why http://www.zlatydrak.sk returns a HTTP/1.1 303 and not 301 permanent redirect like other pages? Is code I added to .htaccess wrong? Link to comment Share on other sites More sharing options...
Zapp Posted September 11, 2012 Author Share Posted September 11, 2012 Hi I redirected my homepage from http://zlatydrak.sk to http://www.zlatydrak.sk by adding following code to my .htaccess: Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^zlatydrak.sk [nc] rewriterule ^(.*)$ http://www.zlatydrak.sk/$1 [L,R=301] I checked whether my webpage http://www.zlatydrak.sk was properly redirected or not here http://www.ragepank....redirect-check/ and I got following report http://www.zlatydrak.sk returns a HTTP/1.1 303 See Other response http://zlatydrak.sk returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.php returns a 301 (permanent) redirect http://zlatydrak.sk/index.php returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.htm returns a 301 (permanent) redirect http://zlatydrak.sk/index.htm returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.html returns a 301 (permanent) redirect http://zlatydrak.sk/index.html returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.shtml returns a 301 (permanent) redirect http://zlatydrak.sk/index.shtml returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.asp returns a 301 (permanent) redirect http://zlatydrak.sk/index.asp returns a 301 (permanent) redirect http://www.zlatydrak.sk/default.asp returns a 301 (permanent) redirect http://zlatydrak.sk/default.asp returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.aspx returns a 301 (permanent) redirect http://zlatydrak.sk/index.aspx returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.cfm returns a 301 (permanent) redirect http://zlatydrak.sk/index.cfm returns a 301 (permanent) redirect http://www.zlatydrak.sk/index.pl returns a 301 (permanent) redirect http://zlatydrak.sk/index.pl returns a 301 (permanent) redirect http://www.zlatydrak.sk/default.htm returns a 301 (permanent) redirect http://zlatydrak.sk/default.htm returns a 301 (permanent) redirect Why http://www.zlatydrak.sk returns a HTTP/1.1 303 and not 301 permanent redirect like other pages? Is code I added to .htaccess wrong? Found solution. I changed code in .htaccess from: Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^zlatydrak.sk [nc] rewriterule ^(.*)$ http://www.zlatydrak.sk/$1 [L,R=301] to Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} !^(.*)\.zlatydrak\.sk$ [NC] RewriteRule ^(.*)$ http://www.zlatydrak.sk/$1 [R=301,L] Link to comment Share on other sites More sharing options...
Patric Posted September 11, 2012 Share Posted September 11, 2012 So I mark the topic as [solved]. Please, next time, do it by yourself by adding [solved] at the beginning of the topic's title. See here how to do. Thanks. ;-) Topic moved into the correct section. Link to comment Share on other sites More sharing options...
moy2010 Posted September 27, 2012 Share Posted September 27, 2012 Thanks a lot for the solution, Zapp . It worked for me too for the 301 redirect. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now