Reputation: 2299
Let's say I have a domain called test.com. Now my index.html is situated in /public_html/client/frontend/questionnaire/index.html, so I can access it in my browser via http://test.com/client/frontend/questionnaire/index.html.
What I want to achieve is:
* As soon as a user enters the url http://test.com, he or she should directly access the index.html
* Restrict the user so that he can only access this index.html file and not other directories on the server.
I think it should work somehow with the correct .htaccess configuration.
Any help would be great :)
Upvotes: 1
Views: 26
Reputation: 785481
You can use this code in your DOCUMENT_ROOT/.htaccess
file:
Options -Indexes
RewriteEngine On
RewriteBase /
RewriteRule ^$ client/frontend/questionnaire/index.html [L]
Here Options -Indexes
is used to disable directory listing.
Upvotes: 1