我有以下文件夹:
mywebsite/en/index.php
mywebsite/en/product/info.php
mywebsite/en/tags/tags.php
mywebsite/en/games/list.php我的网站是运行在友好的网址,最提到的文件可从以下友好的网址访问
mywebsite/en/?pageno=1
mywebsite/en/product/Nike-glove
mywebsite/en/tags/Nike
mywebsite/en/games/ice-sports我有一些例子,但没有像我这样的工作...我想阻止直接访问.php文件..我想用htaccess...can i?
感谢并致以亲切的问候
Reelmark
发布于 2012-07-30 12:06:18
我不确定你到底想要完成什么,但这将阻止你的php文件被直接访问:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /[^\ ]+\.php($|\ )
RewriteRule \.php$ / [F,L]虽然我猜你真的想要重定向到友好的网址时,直接访问的php文件。
https://stackoverflow.com/questions/11715237
复制相似问题