I am trying to write a greasemonkey script for firefox that will check the site upon opening and see if the site is 404'd, and then redirect the user to another location.
thank
// ==UserScript== // @name Redirect // @namespace test // @include * // ==/UserScript== if (/^about:neterror/.test(document.documentURI)) { location.assign(...); }
Make an AJAX request in the URI and check the response code from the returned XHR object for error code 404 (or! = 200).
Do you have access to some kind of JS Framework?
" " , URL- .
"" - , , .
- .
-, , URL-.
url url, apache mod_proxy
Source: https://habr.com/ru/post/1789343/More articles:Best Practice for Progress Bar in Python PyGTK - pythonRewrite (translate) the page portion of a URL in Wordpress - wordpressUsing spaces in URLs and .htaccess - url-rewritingResizing photos as thumbnails such as Flickr and Facebook photostreams? - facebookThe specified module could not find the error on the virtual machine hosting the website - asp.net.net Rx: batch processing ok - c #alternative to statscm - mavenReprocessing Attached Images in Drupal 7 - drupalHow to predict the size of a PostgreSQL index - indexingFormula for popularity in the afternoon? - phpAll Articles