So this may have been answered and I just simply couldn't find it OR maybe it just isn't possible but any help would be appreciated
SO I am trying to get an intranet site set up
Root Directory is htdocs
Server name is home
I have two folders in htdocs, one named act and one named dev
I want to set it up so when you go to home/
It takes you to htdocs/act
When you type home/_dev
It takes you to htdocs/dev
Although if that's not possible, I would be ok with home/dev taking you to htdocs/dev
I would also like it, when you just specify a folder, it assumes you want to index.php file (unless you specify a file such as login.php)
- Currently when you type home/ it does take you to htdocs/act/index.php
- If I specify a file, such as home/login.php it does load htdocs/act/login.php
- I can even navigate to a folder inside act such as
home/demo loads htdocs/act/demo/index.php - I can even navigate to another file in that folder such as
home/demo/login.php does load htdocs/act/demo/login.php - I do like all of that HOWEVER htdocs/dev is completely inaccessible.
- Currently I have
etc/apache2/sites-available/default-ssl.conf
DocumentRoot /htdocs
etc/apache2/sites-available/000-default.conf
DocumentRoot /htdocs
etc/apache2/sites-enabled/000-default.conf
DocumentRoot /htdocs
/etc/apache2/apache2.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /htdocs>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /htdocs/act>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /htdocs/dev>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr note
Include /etc/phpmyadmin/apache.conf
htdocs/.htaccess
RewriteEngine On
RewriteRule ^_dev(.*) /dev$1
RewriteCond %{REQUEST_URI} !^/act [NC]
RewriteRule ^(.*)$ /act/$1 [L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]