的.htaccess重写一切父目录 [英] .htaccess rewrite everything to parent directory
本文介绍了的.htaccess重写一切父目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图重写每个请求上一级目录。
I'm trying to rewrite every request to the parent directory.
这是我的.htaccess的内容
This is the content of my .htaccess
RewriteEngine on
RewriteRule ^(.*)$ ../$1
不幸的是,这是不工作,导致一个错误的请求的错误。这可能吗?
Unfortunately this isn't working and causes a 'Bad Request' error. Is this possible?
推荐答案
在*应与被抓()这样的系统知道它是假设记忆前pression为$ 1。
the .* should be caught between () this way the system knows it is suppose to "memorize" the expression as $1.
这篇关于的.htaccess重写一切父目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文