I tried to access the https://cookiefreecoders.com/Java URL but got the 403 error. Then I renamed the .htaccess file to something else and tried opening the page again, but then it did work.
So I think the Alias rule you set up is causing the issue. I’m not sure what you were hoping to achieve by making /Java/ an alias of /Java/. I would expect that making something an alias of itself would do nothing in the best circumstances and otherwise it breaks stuff. And it seems like the latter has happened.
Thanks for helping. What I am trying to accomplish is to have the sub folder index page appear when mylink/Java/ is clicked, without users having to type mylink/Java/index.html. I want to be able to give out a link to the home page of a sub folder. I need sub sections of my website to have their own index pages. When people give out links to their website they do not include the index.html in the link, it is the default to the site. My sub folder needs to be the default to its own area. At present my subfolder index works but only when I type in index.html. For my home page, index.html is implicit (the default). Also, please note the trailing slash after the link. Without this I get error 403.
You mentioned that renaming htaccess made it work. Please tell me what u did and the logic behind it, thanks
Thanks very much ALL for the responses but I cleared my cache and re tried https://cookiefreecoders.com/Java/ and I still get 403 error. Also I tried in both chrome and firefox. I do not see any changes in my htaccess file nor do i see a renamed htaccess file
You can have a .htaccess file and put whatever directives in it you want.
The problem was that you put all kinds of rules in it to make it so that opening the /Java URL loads the /Java/index.html file. But that’s already the default behavior, and the rules you added broke this behavior.
Having a .htaccess file is not what broke your website. Having bad rules in your .htaccess file is what caused the issue.