httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herb Burnswell <herbert.burnsw...@gmail.com>
Subject [users@httpd] Re: redirect or rewrite specific html files
Date Wed, 05 Feb 2020 23:34:33 GMT
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@gmail.com>
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
>

Mime
View raw message