Redirecting old post url to 404 in wordpress using htaccess

Question

In wordpress I have a post with url https://www.example.com/article.html

I renamed its permalink to https://www.example.com/article-new.html

Now if I open old url https://www.example.com/article.html then it auto 301 redirects to https://www.example.com/article-new.html
due to wordpress built-in feature by default.

However I want to show 404 when someone tries to open https://www.example.com/article.html

I tried putting this in htaccess but it gave 500 server error instead:

RewriteEngine On
Redirect 404 /article.html

Please advice.

0
, samjoezzy 4 years 2020-05-19T11:10:22-05:00 0 Answers 84 views 0

Leave an answer

Browse
Browse