How long does it take for .htaccess changes to tak

2019-04-18 18:41发布

I have added url rewrite rules to my .htaccess file. Should I see these changes working right away?

4条回答
你好瞎i
2楼-- · 2019-04-18 18:55

Changes to .htaccess are immediate and do not require a restart. Normally, if you aren't seeing what you expect from .htaccess changes, you have a syntax error and should check Apache's logs for some idea of what's going on.

查看更多
闹够了就滚
3楼-- · 2019-04-18 18:57

If you use redirect 301, clear browser cache.

查看更多
干净又极端
4楼-- · 2019-04-18 19:14

NVM found it.

The .htaccess files follow the same syntax as the main configuration files. Since .htaccess files are read on every request, changes made in these files take immediate effect.

查看更多
别忘想泡老子
5楼-- · 2019-04-18 19:21

Apparently, some servers only check .htaccess files periodically. I've found this to be the case w/ our AWS host.

My source is only a comment below the answer here, but it matches my experiences and others seem to agree.

查看更多
登录 后发表回答