40

If you are "shutting down a site" then you probably should not be "redirecting" the old site pages to a single page. An HTTP redirect sends a 301 response code, informing users and search engines the pages have moved. (Although mass redirects to a single page are likely to be seen as soft-404s by Google.) Instead, you should be serving a ...


4

But that redirects to example.php/ That is caused by the first (original) rule. Note that the earlier (erroneous) 301 will likely have been cached by the browser. Test with 302 (temporary) redirects to avoid potential caching issues. The Redirect directive is prefix-matching (whole path segments), and everything after the match is appended to the end of the ...


2

The reason http://www.example.com/ is working and https://www.example.com/doesnotexist.html isn't is because your rewrite condition explicitly disables the rewriting if the client is accessing the site via HTTPS (which I believe several major browsers do by default now, but I don't have a source for this right off the top of my head). I'm assuming you did ...


1

You can't use LimitRequestFieldSize in .htaccess (hence the "Internal Server Error"). As noted in the Apache docs, this can only be set in a server config or virtual host context. Unless your shared host gives you specific access to change this setting (which I doubt) or allows you to modify the <VirtualHost> (unlikely) then you can't change ...


1

It's not just Google. The site appears to be 302 redirecting back to the HTTP Referer when performing the "language" redirect. When requesting the document root only you appear to be performing a (unconditional?) language (302) redirect to /es_ES/. However, when the HTTP Referer header is passed then you are redirecting back to the full Referer ...


1

None of those "work" because the regex you specified in your location isn't the same as the regex you specified in Apache's .htaccess, and you aren't trying to use matches from it in try_files. For the .htaccess you have posted, something like this should be more appropriate: location ~ ^(.*)/(.*) { try_files $uri $1.php?rewrite=$2&$args =...


1

Shouldn't this work? RewriteEngine On RewriteRule ^ index.html


Only top voted, non community-wiki answers of a minimum length are eligible