You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Herb Burnswell <he...@gmail.com> on 2020/02/05 23:34:33 UTC
[users@httpd] Re: redirect or rewrite specific html files
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 <he...@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
>