Remap to a subdir
I have an appplication which is ment to be outside public document root...but the hosting provider doesn't allow that...
How can I remap it?
structure:
/
/public_html/app
/public_html/new_public_html
"public_html" is the web server's document_root. "/" is the dir where I'd normally put my app (outside document_root". Since I开发者_开发技巧'm not allowe to do this I neew to somehow remap it without breaking the other redirects...
So on access the server server files in "public_html" I need to redirect it to "new_public_html" where the public part od my app would be...
The "non public" part of my app would reside in "public_html".
The webserver needs to go directly to the new_public_html
but there are other rules in effect:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Content routing
RewriteRule ^([^.]+)/?$ /index.php?$1 [L]
Thanks!
This should work for you:
RewriteRule ^(.*)$ /sub_dir/$1 [L]
Sorry I didn't get it at once, I thought more complicated than it is.
This is what I was looking for... in case anyone has a similar problem...
http://www.alberton.info/zend_framework_mod_rewrite_shared_hosting.html
精彩评论