Reputation: 44066
if there is no index file in the folder how do i rewrite an index file from another folder...so for example the main site has two folders like this
main_folder/no index.php
folder1/index.php
folder2/index.php
what do i have to put in the rewrite rule to make the main page show the index for folder1/index.php
EDIT
got it working with this
RewriteEngine On
RewriteCond %{HTTP_HOST} site.com
RewriteCond %{REQUEST_URI} !folder1/
RewriteRule ^(.*)$ folder1/$1 [L]
Upvotes: 0
Views: 73
Reputation: 6926
Try this:
#in the .htaccess file where there is no exit or in root
Options Indexes #if still fails delete this line
DirectoryIndex /folder1/index.php
Not sure though
edit: for sub levels maybe adding this solves.
RewriteCond %{REQUEST_URI} ^/folder1/
RewriteRule ^(.*)$ http://www.example.org/$1 [L]
Upvotes: 3