Re: Reducing redirects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You could consider creating a static table using RewriteMap: https://httpd.apache.org/docs/current/rewrite/rewritemap.html
Rather than first doing http to https and www to non-www, consider adding the RewriteMap in the http- and www-vhosts that you have and redirecting to the final URL straight from there. That will save you some redirects. Then just do the fallback to https and/or non-www after the RewriteRules. Also, if you're already redirecting from http to https, what's stopping you from doing the redirect to non-www directly?  You could do "http to www or non-www redirects to https non-www" in a single step.

Gillis

On Fri, Jan 26, 2024 at 5:40 AM Dave Wreski <dwreski@xxxxxxxxxxxxxxxxxxx.invalid> wrote:

Hi,

I think I have what is a pretty involved request for assistance. We have a website with content that is decades old and has tens of thousands of pages of content of the form /content/view/1234, where 1234 is the Joomla article ID.

Joomla has since started using search-engine friendly URLs like /news/article.html. Some years ago we created a script that translates the older /content/view/1234 format to its /news/article.html equivalent, but that introduces a redirect. Add to that other potential redirects, like http to https, www to the non-www version, and it delays the visitor's time to get to the article and impacting our SEO.

Is there a way to consolidate all of these redirects into a fewer number? This site is proxied behind cloudflare, if that makes a difference.

Here is an example:

http://www.linuxsecurity.com/content/view/117302/49

Here's what https://httpstatus.io/ says about the redirects that are involved:

redirects

I also thought of creating a static table of every possible /content/view/1234 article to their /news/article.html as RewriteRules, but there are tens of thousands of these - enough that it would probably impact performance of every request.

dave







[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux