Apache 修改重写链接,并禁用原始
我有一个工作模式重写Apache 修改重写链接,并禁用原始,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我有一个工作模式重写 RewriteEngine On RewriteRule ^notifications$ /notifications.php [L] 然而,我在一些网站上看到过,他们的链接似乎都像website.com/login-website.com/notifications-website.com/profile 我想我已经取得了与我的mod重写相同的结果。但是,我如何防止用户像其他网站那样进入我的/notifications.php页面呢 谢谢 添加另一条规则,查找对php文
RewriteEngine On
RewriteRule ^notifications$ /notifications.php [L]
然而,我在一些网站上看到过,他们的链接似乎都像website.com/login-website.com/notifications-website.com/profile
我想我已经取得了与我的mod重写相同的结果。但是,我如何防止用户像其他网站那样进入我的/notifications.php页面呢
谢谢 添加另一条规则,查找对
php
文件的直接请求,并将其重定向到非php
URL:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /notifications\.php
RewriteRule ^ /notifications [L,R=301]