Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Ok so I up an apache2 server on Ubuntu running LAMP and am hosting a website with some python scripts here and there. My problem has multiple parts (sorry):
1.) Anyone can simply go to the extension file and access it. For extample www.myWebsitename.com/*a file name* where they can put index.html or home.html at the end and have access to that, (i.e www.website.com/home.html) I only want the browser and my PHP code to be able to redirect them to those pages but not themselves. I only want to give them access to one page initially and let the PHP/html/css code redirect them.
2.)I also want to hide the extensions from showing at the end. For example www.mywebsite.com/index.html would become www.mywebsite.com/index




Thank you again.

What I have tried:

I've tried using cookies to make sure that they are able to access the page by accessing the cookie and if it is not the person that is suppose to be on it then it would redirect them to the welcome page, but for some reason that fails.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900