Jump to content

[Solved] 301 permament redirect - Question


Recommended Posts

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

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

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

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

  • 3 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...