简体   繁体   English

没有.htaccess文件,如何更改重写规则?

[英]How can i change rewrite rules without .htaccess file?

I have problem: 我有问题:

I developped a website, and when i host it, i find that the server don't accept to create or to update the .htaccess file (security). 我开发了一个网站,当我托管它时,我发现服务器不接受创建或更新.htaccess文件(安全性)。 the costumer don't want to change server and the server administrator don't have a solution. 客户不想更改服务器,服务器管理员也没有解决方案。 can you help me? 你能帮助我吗?

The way to solve this problem is either to use a permalink scheme which requires no .htaccess changes, or to find a better web host. 解决此问题的方法是使用无需更改.htaccess的永久链接方案,或者找到更好的Web主机。

Wordpress's permalink scheme relies on rewrite rules, and as far as I know there is no pure-PHP permalink implementation (and, absent major architecture changes, no such implementation can exist). Wordpress的永久链接方案依赖于重写规则,据我所知,没有纯PHP的永久链接实现(而且,如果没有主要的体系结构更改,那么就不可能存在这种实现)。 Therefore, if you cannot modify the .htaccess file in your Wordpress instance's root directory, and (as I assume) you also cannot modify the Apache configuration file which applies to your site, then your two simplest options are either to give up on using any permalink scheme which requires changes to .htaccess , or to give up on your current web host entirely and find one which better supports your requirements. 因此,如果您无法修改Wordpress实例的根目录中的.htaccess文件,并且(也假设我也无法)修改适用于您网站的Apache配置文件,那么您最简单的两个选择就是放弃使用任何需要更改.htaccess永久链接方案,或者完全放弃当前的Web主机,并找到一种更好地支持您的要求的方案。

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

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