Forum Moderators: phranque

Message Too Old, No Replies

htaccess redirect all to this folder, except this and this

htaccess, getting full control of subdomains

         

dan1eln1el5en

3:55 pm on Sep 2, 2011 (gmt 0)

10+ Year Member



Hey Forum (first post, did try to search)

I got a site where the CMS system is in a dedicated folder, in the root there is all the authentication files, some other sites etc.

So let me give an example:
www/_cms <- is www.exmaple.com
www/blog <- a wordpress at blog.example.com
www/phpmyadmin <- phpmyadmin.example.com
and then on top of that I want that in the CMS we create a page, e.g. Site (controlled by the CMS) with results in site.example.com

at the moment I got

Options -Indexes
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule .* http://www.example.com/[L,R=301]
RewriteRule ^$ _cms/index.php[L]
RewriteCond %{DOCUMENT_ROOT}/_cms%{REQUEST_URI} -f
RewriteRule .* _cms/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* _cms/index.php?q=$0 [QSA]

how do I enter more exceptions to the general rule (e.g. the blog, the phpmyadmin and the Sites) ?
google, yahoo, bing etc. should still get the site authentication files at /

(inside the CMS folder the default .htaccess is untouched)

Any help appreciated.

wilderness

12:37 pm on Sep 3, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There is a rather recent thread on this, with a near identical subject line.