RewriteEngine叙述在强制所有重写?(RewriteEngine On mandatory for all rewrites)

   IT问题网   2018-09-27 00:00:00

问 题

我只是想知道是否有必要包括rewriteengine叙述上并重写基地/每次我加了改写?例如,我想用这两个和"在某些时段白天^对文件块的访问"(示例从askapache.com报价)

在"从url ^删除query_string"

删除query_string从网址

rewriteengine叙述上
的rewritebase /
的rewritecond%{query_string}。
重写规则^的login.php /login.php? [l]
 

在特定的时间为一天,以文件的数据块存取^

 选项+了followsymlinks
rewriteengine叙述上
的rewritebase /
#如果小时为16(下午4:00),然后拒绝所有访问
的rewritecond%{time_hour} ^ $ 16
。重写规则^ * $-[f,l]
 

我都不可能将它们合并成以下?

 选项+了followsymlinks
rewriteengine叙述上
的rewritebase /
的rewritecond%{query_string}。
重写规则^的login.php /login.php? [l]
#如果小时为16(下午4:00),然后拒绝所有访问
的rewritecond%{time_hour} ^ $ 16
。重写规则^ * $-[f,l]
 

在此先感谢您的时间。

解决方案

是 rewriteengine叙述和的rewritebase 要只能指定一次。

标签:叙述强制强迫所有重写



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

文件夹重定向到另一个htaccess的(Redirect folder to another with htaccess)

problem i've got a problem with redirecting folder to a n ...

取出需要的Yii上写的index.php(Remove the need to write index.php on Yii)

problem i've setup yii 1.1.x on my wamp environment, it a ...

htaccess的mod_rewrite的解释(.htaccess mod_rewrite explanation)

problem i've been trying to get this mod rewrite thing do ...

回退404图片(Fallback for 404 images)

problem on a daily basis i automatically imported several ...

htaccess的路由PHP(.htaccess routing PHP)

problem i am trying to write some simple routing in htacc ...

在.htaccess文件验证Googlebot的(Verifying Googlebot in .htaccess file)

problem i have been investigate a bit. will code below wo ...

Laravel路由不工作,Apache配置只允许公共/ index.php文件/路由(Laravel Routes not working, Apache configuration only allows for public/index.php/route)

problem example: route::get('/get', function ...

重定向到使用的.htaccess HTTPS(Redirect to https using .htaccess)

problem i have a problem with .htaccess i have a certifi ...

一系列重写规则无尾页[L]标志(A series of rewriterule without Last [L] Flag)

problem update: today i kind of find out what the problem ...

XAMPP的mod_rewrite的.htaccess不工作(XAMPP .htaccess mod_rewrite not working)

problem i am running xampp for windows 5.6.11. i have the ...

与普通的前pression htaccess的重写规则(htaccess rewrite rule with regular expression)

problem i have a hard time to create rewrite rule for a r ...

RewriteEngine叙述在.htaccess赶上文件没有不散的HTML(Rewriteengine in .htaccess to catch files not ending in html)

problem i'd like to use mod rewrite in to con ...

从网站的URL删除的index.php(Removing index.php from website URLs)

problem i am using the kohana framework (but ...

的.htaccess mod_rewrite的:重写查询字符串为路径(.htaccess mod_rewrite: rewriting querystring to path)

problem how could i use a rewrite to change: /tag=foo ...

在.htaccess有条件的DirectoryIndex(conditional DirectoryIndex in .htaccess)

problem is it possible to make the directoryindex value i ...

htaccess的重写导致500错误,而不是404(htaccess rewrite causes 500 error instead of 404)

problem i've recently added this little bit of code to my ...

prevent执行父文件夹的.htaccess(Prevent executing .htaccess of parent folder)

problem hello i have two different sites on same domain f ...

我如何找出用户的放大器;组Apache正在运行的?(How do I figure out what user & group Apache is running as)

problem on dreamhost shared hosting, i'm setting up htpas ...

的.htaccess URL重写问题(脚本不加载)(.htaccess URL Rewrite Problem (Scripts don't load))

problem i am having a problem with an url rewrite issue i ...

如何限制/禁止访问特定的文件类型,如.js文件的CSS里面.htaccess文件?(How to restrict/forbid access to specific file types such as .js .css inside a .htaccess file)

problem if the remote user knows the exact location of th ...