Im not exactly sure how to explain this but my webpage example: http://www.test.com now i dont have a directly or page setup for example: http://www.test.com/test How can i stop people from adding things at the end of my domain taking them straight to my website if i didnt create the directory?? Thank You.
You can't stop people from entering whatever URL they wish on the client side but what you can do is redirect people to your homepage if the page is not created since it would return a 404 error. To do this just create a .htaccess text file in your root directory and add this directive: ErrorDocument 404 http://www.test.com Code (markup): With this if the page DOES exist it will load correctly but if the page DOES NOT exist it will redirect to the page in the directive which in this case is www.test.com. Hope this helps!