Re: redirect or rewrite specific html files

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

 



Sorry I should have added the version information:

Server version: Apache/2.4.34 (Red Hat)
Server built:   Apr  3 2019 12:07:34
Server's Module Magic Number: 20120211:79
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)

I was hoping this was pretty straight forward but maybe it is not..

Thanks,

HB

On Tue, Feb 4, 2020 at 9:14 AM Herb Burnswell <herbert.burnswell@xxxxxxxxx> wrote:
Hi,

I am looking for some guidance on how to forward specific html files to a new locations.  The motivation is for users who might have bookmarked a no longer current location and best practices for SEO functionality.  Here would be an example:

Old:
https://example.com/old/path/to/old_file.html

New:
https://example.com/new/path/to/new_file.html

There is no consistency to the path of old and new file locations, so my thought would be to define based upon the URI ending in old_file.html.  However, in my testing I have not been able to get it correct.  Would something like this be the best approach, of course I need to get the proper regex to allow it to work?

Redirect      ".*/old_file\.html$"     "https://example.com/new/path/to/new_file.html" [R=301,L]

 Is a 301 redirect the best way to ensure that SEO is updated for new locations?

Any guidance is much appreciate.

Thanks,

HB

[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