简体   繁体   English

如何使htaccess Rewriterule在根目录上的文件?

[英]how to make htaccess Rewriterule for a file on root?

I am using Yii framework, I have a file on the website root named test.php, I want to make a rule that redirects this link "staging.mysite.com/p/test" to this file. 我正在使用Yii框架,我在网站根目录上有一个名为test.php的文件,我想制定一条规则将此链接“ staging.mysite.com/p/test”重定向到该文件。 what I did: 我做了什么:

RewriteRule ^p/test$ test.php [QSA,L]

But I got this error 但是我得到这个错误

Internal Server Error Application runtime path "/var/www/staging.mysite.com/protected/_ws/runtime" is not valid. 内部服务器错误应用程序运行时路径“ /var/www/staging.mysite.com/protected/_ws/runtime”无效。 Please make sure it is a directory writable by the Web server process. 请确保它是Web服务器进程可写的目录。

It says your runtime folder is missing. 它说您的运行时文件夹丢失。

try create a runtime folder under /var/www/staging.mysite.com/protected/_ws/ 尝试在/var/www/staging.mysite.com/protected/_ws/下创建一个运行时文件夹

and make the permission to be 775 并允许为775

Then try again? 然后再试一次?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM