Redirect browsing directory to the Homepage in core php?

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
bilalshafi
New php-forum User
New php-forum User
Posts: 3
Joined: Tue Aug 03, 2021 6:38 pm

I have a website that is built in the CORE PHP. When added " Option-indexes " my directory browsing file was hidden. Now i want that when someone open the " BROWSING DIRECTORY " then i will automatically redirect to my home page?

Can anyone help me?
AdoptiveSolution
php-forum GURU
php-forum GURU
Posts: 218
Joined: Wed Jun 15, 2016 8:35 am

Put an index.html in that folder with a meta redirect at the top of the page.
https://css-tricks.com/snippets/html/meta-refresh/
Post Reply