Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


bigalow

568 posts

Ultimate Geek
+1 received by user: 112


#208390 9-Feb-2017 19:49
Send private message

at the moment i been using this on 1 site

 

RedirectMatch 302 (.*)\.html$ http://www.mysite.com/folder/index.shtml

 

now i'm using another domain to mirror the first site

 

so i want to change it to something like this

 

RedirectMatch 302 (.*)\.html$ http://%{HTTP_HOST}%/folder/index.shtml so the 2nd domain doesn't redirect to the 1st domain

 

of cause that does not work

 

is there another why i can get this to work ?

 

 

 

thanks

 

 

 

 

 

 

 

 

 

 





 

 

 


Create new topic
bigalow

568 posts

Ultimate Geek
+1 received by user: 112


  #1718399 10-Feb-2017 18:20
Send private message

 dont worry i got it now by using

 

 

 

RewriteEngine on
RewriteRule (.*)\.html$ /folder/index.shtml [NC,R]

 

 





 

 

 




jarledb
Webhead
3319 posts

Uber Geek
+1 received by user: 1983

Moderator
ID Verified
Trusted
Lifetime subscriber

  #1718403 10-Feb-2017 18:33
Send private message

Which should give you a 301 redirect. If you want to pass on any Google juice, you should NEVER use 302. 302 is for temporary redirects and should never be used to tell search engines (and browsers) about new locations for content.

 

Sounds like you are creating another SEO nightmare for yourself though..





Jarle Dahl Bergersen | Referral Links: Want $50 off when you join Octopus Energy? Use this referral code
Are you happy with what you get from Geekzone? Please consider supporting us by making a donation or subscribing.


bigalow

568 posts

Ultimate Geek
+1 received by user: 112


  #1718516 11-Feb-2017 00:17
Send private message

what should i use then ?

 

is this ok ?

 

RewriteEngine on RewriteRule (.*)\.html$ /folder/index.shtml [NC,R]





 

 

 


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.