Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
147
rated 0 times [  148] [ 1]  / answers: 1 / hits: 38239  / 12 Years ago, wed, december 12, 2012, 12:00:00

I'm running Apache 2.0 and I'm just wondering if it is possible to make a 301 redirect using JavaScript or jQuery.



I have an <a></a> tag with href to a specified location and I'm asked to make a 301 redirect when I click that link.



This is for SEO and I'm trying to find a way to do the 301 redirect to the same page in the link without having to create a new page or create a form/submit.


More From » jquery

 Answers
144

In short No.



JavaScript runs entirely on the client side. 301 redirects are supposed to come as a response from the server. Which means you cannot do this without server support.


[#81460] Tuesday, December 11, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josuea

Total Points: 609
Total Questions: 121
Total Answers: 104

Location: South Georgia
Member since Fri, Nov 13, 2020
4 Years ago
josuea questions
;