Directory listing on homepage

Hi,
My site is REDACTED <-- Sorry, I only added it because the rules said I had to, I don’t want my site to be public.

Basically what I want is to have a directory listing, the same one that shows when you create a folder and go to the folder URL, and remove /?dir= from the URL
Here is an example.

My site is just a simple repo I can keep track of my files with. Obviously I could just put my data into a folder and access it via the URL, but I want the link to be as short as possible, hence my domain me simple and straight to the point.

The only thing I have tried, is adding “Options +Indexes” to the .htaccess file

My homepage directory only contains the temp folder I created for the example given here, and an empty .htaccess file.

Good day @HudsonJD!

You could create a folder named index in /public_html and move all your content to /public_html/index

Then when you access your site your content should be listed in Apache24 style.

I just did as you said and did not get the desired effect, I want the content listed from the root site. Without needing to put anything on the end of the link like /index

My post was flagged and hidden for “spam” ?

How is this post spam?

Unsure the automatic system did it …

ahh I see, instead of posting the picture I tried to link to the /temp folder for the example

Someone just told me that it’s not working for me because 000webhost doesn’t allow you to use the root page like that? Is that the case?

I’ve developed a simple script for you to use. Just add the code below into index.php

https://jsfiddle.net/v40ydba3/

1 Like