2013-08-28 4 views
0

작동중인 모드 다시 쓰기가 있습니다. 그러나, 나는 일부 사이트에서 본모드 다시 쓰고 링크를 다시 쓰고 비활성화하십시오

RewriteEngine On 
RewriteRule ^notifications$ /notifications.php [L] 

그들의 링크는 내가 같은 달성 한 생각 website.com/login website.com/notifications website.com/profile

같은 모든 것 같다 내 mod-rewrite 결과. 하지만 어떻게하면 다른 웹 사이트처럼 /notifications.php 페이지를 사용자가 입력하지 못하게 할 수 있습니까?

감사합니다.

답변

1

php 파일의 직접 요청을 보이는 다른 규칙을 추가하고 비 php URL로 리디렉션 :

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /notifications\.php 
RewriteRule^/notifications [L,R=301] 
관련 문제