I want to redirect only one specific URl (ex. mypage.com/1234/page/) to error page 404. How to achieve it in htaccess?
Tell me more
×
Webmasters Stack Exchange is a question and answer site for
pro webmasters. It's 100% free, no registration required.
|
With mod_alias activated, you can do that with the Redirect directive:
Redirect expects usually the target as 3rd argument, leaving it brings up the configured ErrorDocument. If a target is added it would result in an internal error. As can be read in the docs:
(Thanks @w3d for that note!) |
|||||||
|