Questions tagged [directoryindex]
70 questions
0
votes
1 answer
Showing "mydomain.com" if I enter "mydomain.com/index.htm"
Like most servers, if I enter: www.mydomain.com, my server shows www.mydomain.com/index.htm and my Browser continues to show www.mydomain.com
But if I enter into my Browser www.mydomain.com/index.htm, can I tweak htaccess to show www.mydomain.com in…
![](../../users/profiles/4151675.webp)
iantresman
- 259
- 1
- 11
0
votes
1 answer
Can I style out the .htaccess DirectoryIndex file?
I have a DirectoryIndex page that I want to style out with CSS. Instead of it looking like this:
Is it possible to make it look different?
![](../../users/profiles/2778281.webp)
HuskyBlue
- 116
- 1
- 1
- 8
0
votes
1 answer
Directory index page precedes htaccess
What I want is that only if my root domain is accessed meaning URI is empty, it gets rewritten without redirect, otherwise rewrite to index.php if not accessing file or folder. My .htaccess looks like this:
RewriteEngine On
RewriteBase /
RewriteRule…
![](../../users/profiles/5388163.webp)
igrynsh
- 3
- 2
0
votes
1 answer
configuring htaccess directory index file
Scenario:
I created this htacces file to redirect subdomains. So far it works.
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST}…
![](../../users/profiles/4740440.webp)
Ariel
- 359
- 4
- 5
0
votes
1 answer
.htaccess DirectoryIndex /subfolder/index.php seems to manage links in a funny way
I have the default myIndex.php in a subfolder of public_html.
I added a file .htaccess in public_html.
I added DirectoryIndex /subfolder/myIndex.php in it.
myIndex.php contains links and includes.
Includes seems to work but links dont: no…
![](../../users/profiles/1409857.webp)
LLuu
- 109
- 2
- 6
0
votes
1 answer
How to allow downloading files with PHP, but deny direct access to directory listings
I am using Apache on my server and I'd like to allow my visitors to download resources free of charge. However, to preserve even a little bit of bandwidth I'd like to deny direct access to the root folder of the resources like…
![](../../users/profiles/4848765.webp)
Devon Lively
- 3
- 2
0
votes
2 answers
setup Directory Index dynamically
I'm developing a web application using php. I need to setup directory indexes for each folder dynamically.
How can i set directory indexes other than index.php for each folder that i create in Apache?
my current folder structure is as…
![](../../users/profiles/2182143.webp)
user2182143
- 802
- 9
- 10
0
votes
2 answers
Apache DirectoryIndex directive not working correctly with Ruby on Rails
I have a site where Ruby on Rails is running at the root directory via Phusion Passenger. Some Apache Alias directives serve static HTML directories.
If you request an exact URL of a file from one of the static directories, Apache returns it as…
![](../../users/profiles/1407170.webp)
sffc
- 5,235
- 2
- 39
- 61
0
votes
1 answer
Apache DirectoryIndex not working for subfolder
I'm using an .htaccess file to set a few options for a folder but the DirectoryIndex rule doesn't seem to be working in a sub-folder. Here is my .htaccess file.
AuthUserFile /var/www/.htpasswd
AuthType Basic
AuthName "Folder"
Require user…
![](../../users/profiles/3912172.webp)
andyrue
- 632
- 9
- 19
0
votes
1 answer
apache not returning index.php as default
I recently made a DigitalOcean droplet with LAMP pre-installed.
Went and uploaded my website (including index.php) to /var/www
Apache just returns the It Works! page,
I have to manually add /index.php to my url
Things I have tried:
Made an…
![](../../users/profiles/3173997.webp)
CodeCrab
- 57
- 5
0
votes
1 answer
Apache returning 403 status code along with page content
I have a cPanel hosting account with my primary domain pointing to public_html. But, to make directory structure better, I add the following code to public_html/.htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}…
user2286243
0
votes
1 answer
Connect an directory index to another directory index
I'm trying to call my index.php on my cPanel, however since my hosting service only allows up to 1 sublevel of directory, I have to bring up my index.php.
I'm using Yii framework, and since it's my first application. I dont know how to link it. I…
![](../../users/profiles/905513.webp)
marchemike
- 2,999
- 13
- 42
- 90
0
votes
3 answers
Website link with out “/”
My Apache 2.2 is running on port "8080" I want to call my site url http://www.example.in:8080/abc/xyz.html/index.php (xyz.html is a folder)
as ....
http://www.example.in:8080/abc/xyz.html
Can any one help me with the .htaccess for this..
NOTE:
1)…
![](../../users/profiles/2770370.webp)
Sreekanth Sagar
- 57
- 7
0
votes
1 answer
Using CGI page as directory index in Boa web server
I am using Boa web server on an ARM based board.
I wish to use a cgi script as the home page.
In boa.conf, I used the option
DirectoryIndex index.cgi
However, when entering the IP of the host board in my browser, all I get is error 403, and the…
![](../../users/profiles/2080296.webp)
eliba
- 140
- 10
0
votes
1 answer
Apache: Copied files from another directory do not work
I recently set up my Apache server (2.2) with PHP (5.3) on my Oracle Linux computer. Initially, I created three files: index.html, index.php, and countries.html. I believe (do not recall 100%) that I created these files in my /var/www/html/…
![](../../users/profiles/1436448.webp)
Zhouster
- 686
- 2
- 11
- 23