.htaccess to two subdirectories
I am trying to make a .htaccess control the access to my websites. I have two websites: one with a wordpress blog and other with a wiki-site placed mydomain.com/wordpress and mydomain.com/wiki.
I want my domain to access /wordpress without showing this in the http-adressebar. (wordpress has been configuration right).
The wiki-site should just be shown under /wiki.
I have tried a lot of solut开发者_StackOverflowions (also on stackoverflow), but nothing worked so far.
RewriteEngine On
RewriteBase /mydomain.com/
# WIKI
RewriteCond %{REQUEST_FILENAME} !-f # Existing File
RewriteCond %{REQUEST_FILENAME} !-d # Existing Directory
RewriteRule ^wiki/(.*)$ wiki/index.php?title=$1 [L,QSA]
# WORDPRESS
# RewriteCond %{REQUEST_FILENAME} !-f # Existing File
# RewriteCond %{REQUEST_FILENAME} !-d # Existing Directory
# RewriteRule ^/*$ /wordpress/index.php [L,QSA]
EDIT
www.mydomain.com -> www.mydomain.com/wordpress
www.mydomain.com/wiki/(.*)$ -> www.mydomain.com/wiki/index.php?title=$1
Simple answer - you can't do it that way, because, let's say you have an url that points to
http://www.yourdoamain.com/index.php
- what would you expect your apache to hit - the wiki, or the blog?
精彩评论