httpd-users mailing list archives

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

    [root@sn acme-challenge]# pwd
    [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
    [root@sn acme-challenge]# cat test.txt

When I enter ``, the content of the
file is shown which is `uu`. 

However, when I enter ``,
it is redirected to the main site which is ``.

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 "\.(css.gz|css.gzip)$">
      ForceType text/css

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

    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|/[^.]*)$ 
    RewriteCond %{REQUEST_FILENAME} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$ 
    RewriteRule (.*) index.php

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

View raw message