: Reach only one file through :80 I have an owncloud server which is using HTTPS (www/owncloud). I redirected all HTTP request to HTTPS. Now I need to reach one file using HTTP (www/other/directory/file.txt).
I have an owncloud server which is using HTTPS (www/owncloud). I redirected all HTTP request to HTTPS.
Now I need to reach one file using HTTP (www/other/directory/file.txt). How can I achive this without making any other files reachable through HTTP?
Thanks in advance!
More posts by @Harper822
1 Comments
Sorted by latest first Latest Oldest Best
Redirect permanent / mysite/owncloud
You'll need to change this to mod_rewrite in order to implement an exception for the URL you want to keep on HTTP. For example:
RewriteEnging On
ReeriteCond %{REQUEST_URI} !^/other/directory/file.txt
RewriteRule (.*) mysite/owncloud/ [R,L]
I've assuming www is your document root (from your redirect) and so /other is a root-relative URL, relative to this document root?
This is also a temporary (302) redirect, so change R to R=301 when you are sure it's working OK.
You'll need to make sure your browser cache is clear before testing.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.