How to disable or remove web pages from my web site

360 Views Asked by At

I want to block or delete some pages on my website. Maybe these pages can be used again in the future, so I don't want to delete them directly and I want to prevent users from accessing these pages via URL or my website. I searched a bit but couldn't find much detail.

Could you suggest me what I can do about it?

2

There are 2 best solutions below

0
lolmhhh3 On

You could add a script element to the header for your HTML and have the script be,

location.href = "homepage.location/";
0
Bruce Zhang On

I don't want to delete them directly and I want to prevent users from accessing these pages via URL or my website

If you want to set it in IIS, Request filtering is a great choice for you. You can add any URL in it to prevent others access it and don't need to delete physical file.

Now I can access it.

enter image description here

Add a deny sequence. enter image description here

Now I cannot access.(Same URL) enter image description here