I have the following .htaccess file in a directory:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://www.mysite.com/launch [R,L]
DirectoryIndex index.html
Basically, this forces any and all pages below mysite.com/launch to an SSL version of https://www.mysite.com/launch/index.html.
However, for a single sub-directory under /launch I need to be able to allow access without user being redirected.
For example, if they navigate to http://www.mysite.com/launch/files/photos, then they should be able to access individual files inside the /photos directory.
Do I use another .htaccess file inside the /photos directory, or do I modify the existing .htaccess file in the /launch directory?
i used something like that.
so when mysite.com/intranet is called it goes into the folder intranet
or when mysite.com/cv is called it goes into the cv folder
but in this case when no subdir is called it forces to go into ‘somedirname’
of course you can change the last
rewriterule to RewriteRule ^(.*)$tohttps://www.mysite.com/launch [R,L]putting the other rewriterule on top for checking it is not the directory they can access
so you end up with something like this:
now
http://www.mysite.com/subdir1
and
http://www.mysite.com/subdir2
can be opened in the browser