redirect or rewrite specific html files

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

 



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