Redirect url


#1

This is the problem:

A. I have brochures printed with the url www.domain.com/yourfreereources.

B. The url should be www.domain.com/yourfreeresources.html

C. When the incorrect url is entered a 404 error results.

D. How do I redirect from the incorrect address to the correct address (the one with .html on the end)?

Reading around I see that a 301 Redirect seems to be the best bet but before I dive into .htaccess files (about which I know very little) I just want to be sure there is not an easier way.

If I have to do some new coding is there a step by step process anywhere?


#2

There’s not an easier way.

This particular task is very easy. See RedirectMatch Directive

RedirectMatch 301 ^/yourfreereources$ http://www.domain.com/yourfreeresources.html


#3

Thank you - at least I know now.