httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mahmood Naderan <nt_mahm...@yahoo.com.INVALID>
Subject [users@httpd] Viewing the content of a file without extension in the URL
Date Fri, 21 Dec 2018 08:57:54 GMT
Hi
Using Apache and Centos 7, I have put two specific files in `/var/www/html` as below


    [root@sn acme-challenge]# pwd
    /var/www/html/.well-known/acme-challenge
    [root@sn acme-challenge]# ls -l
    total 8
    -rw-r--r--. 1 root root 88 Dec 21 12:19 8KyeoB4HPzOPR6Et9uBPWoldME6LGIBV3ps
    -rw-r--r--. 1 root root  2 Dec 21 12:20 test.txt
    [root@sn acme-challenge]# cat 8KyeoB4HPzOPR6Et9uBPWoldME6LGIBV3ps
    8KyeoB4HPzOPR6Et9uBPWoldME6LGIBV3ps.QTHp9d8EEr94A5QohL1LAlh51l9Wsy4ET1jo
    [root@sn acme-challenge]# cat test.txt
    uu


When I enter `https://somewhere.com/.well-known/acme-challenge/test.txt`, the content of the
file is shown which is `uu`. 


However, when I enter `https://somewhere.com/.well-known/acme-challenge/8KyeoB4HPzOPR6Et9uBPWoldME6LGIBV3ps`,
it is redirected to the main site which is `https://somewhere.com`.





The content of `/var/www/html/.htaccess` is


    Options +FollowSymLinks
    RewriteEngine On

    AddEncoding gzip .gz
    AddEncoding gzip .gzip
    <FilesMatch "\.(js.gz|js.gzip)$">
      ForceType text/javascript
    </FilesMatch>
    <FilesMatch "\.(css.gz|css.gzip)$">
      ForceType text/css
    </FilesMatch>

    <Files CHANGELOG.txt>
    deny from all
    </Files>
    <Files INSTALL.txt>
    deny from all
    </Files>
    <Files UPDATE.txt>
    deny from all
    </Files>



    RewriteCond %{REQUEST_URI} !^/index\.php
    RewriteCond %{REQUEST_URI} !/ow_updates/index\.php
    RewriteCond %{REQUEST_URI} !/ow_updates/classes
    RewriteCond %{REQUEST_URI} !/ow_cron/run\.php
    RewriteCond %{REQUEST_URI} !/ow_cron/run\.php
    RewriteCond %{REQUEST_URI} !/e500\.php
    RewriteCond %{REQUEST_URI} !/captcha\.php
    #RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$ 
[NC]
    RewriteCond %{REQUEST_FILENAME} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$ 
[NC]
    RewriteRule (.*) index.php




How can I fix that so that I can view the content of `8KyeoB4HPzOPR6Et9uBPWoldME6LGIBV3ps`?



Regards,
Mahmood
Mime
View raw message