PaperChase
PaperChase

Reputation: 1575

How to add a 404 for a specific URL in htaccess

I have a page at http://www.example.com/my-inner-page. I need my server to respond with a 404 when someone tries to access this url. What is the rule I would use in htaccess to accomplish this?

Thanks!

Upvotes: 1

Views: 481

Answers (1)

salih0vicX
salih0vicX

Reputation: 1373

You can use RedirectMatch:

RedirectMatch 404 "my-inner-page"

Upvotes: 1

Related Questions