重新映射到子目录
我有一个应用程序位于公共文档根目录之外...但托管提供商不允许这样做...
我如何重新映射它?
结构:
/
/public_html/app
/public_html/new_public_html
“public_html”是Web服务器的document_root。 “/”是我通常放置应用程序的目录(在 document_root 之外)。由于我不允许这样做,所以我需要以某种方式重新映射它而不破坏其他重定向......
所以在访问服务器服务器文件时 其中我的应用程序的公共部分将...
我的应用程序的“非公共”部分将驻留在“public_html”中。
“public_html”我需要将其重定向到“new_public_html” , >new_public_html 但还有其他有效规则:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Content routing
RewriteRule ^([^.]+)/?$ /index.php?$1 [L]
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这应该对你有用:
抱歉我没有立即明白,我认为比实际情况更复杂。
This should work for you:
Sorry I didn't get it at once, I thought more complicated than it is.
这就是我一直在寻找的...万一有人遇到类似的问题...
http://www .alberton.info/zend_framework_mod_rewrite_shared_hosting.html
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