我知道有很多关于将所有页面重定向到特定的域/ index.php或html页面的教程。
但我需要将我的所有页面重定向到ServerIP/myDirectory/ProjectName/index.php
,因为我在办公室工作,该办公室共享客户端。所以在我的电脑上,我需要去我的本地服务器上的目录,然后使用服务器的wamp。将所有页面重定向到/index.php文件
例如网址:http://192.168.0.100/myDirectory/ePortal/index.php
我怎么能这样做?我在我的htaccess文件中有这个。
RewriteBase /myDirectory/ePortal/
RewriteRule .* index.php
但是这个htaccess是错误的。出现500内部错误。
你试过: 的RewriteRule^/(。*)的http://192.168.0.100/myDirectory/ePortal/index.php [L,R] 虽然是192.168.0.100从外部无法访问,因为它是本地IP。 – jacouh
它的工作,但有一个文件路径的问题。例如:
在其工作的实际域中不起作用。 –
Pars
我明白你想要做什么。我写了一个框架,基本上做同样的事情(通过'index.php'路由所有流量),并且它有静态路径。你需要查看root和'public /''.htaccess'文件https://github.com/andyhmltn/Cherry-Framework/ – andy