MAMP에 내 사이트를 구축하고 며칠 후 마침내 .htaccess 파일을 얻은 후 내 의지대로 작업합니다. 하지만 지금은 라이브 환경에 업로드 할 때 같은 행동하지 않습니다! 다른 버전이 있습니까? MAMP가 자동으로 처리하는 파일에 오류가 있기 때문입니까?.htaccess MAMP와 라이브 환경의 차이점
그렇지 않은 경우 이러한 특수 파일은 기본 RewriteRule을 사용합니다. 스크립트/이미지/mediacontent/서비스 /의 robot.txt 작동하지만 NOT (login.php, hybridauth, 블로그) \w+
와
#start
Options +FollowSymlinks
RewriteEngine On
RewriteBase/
# main site
RewriteCond %{REQUEST_URI} !^/scripts/(.*\.js)$
RewriteCond %{REQUEST_URI} !^/styles/(.*\.css)$
RewriteCond %{REQUEST_URI} !^/images/(.*\.jpg|.*\.png|.*\.gif)$
RewriteCond %{REQUEST_URI} !^/mediacontent/(.*\.jpg|.*\.png)$ [NC]
RewriteCond %{REQUEST_URI} !^/services/(.*\.php)$
RewriteCond %{REQUEST_URI} !^/login\.php$
RewriteCond %{REQUEST_URI} !^/hybridauth/$
RewriteCond %{REQUEST_URI} !^/blog/$ [NC]
RewriteCond %{REQUEST_URI} !^/robot.txt$
RewriteRule (\w+) index.php?page=$1 [NC,L]
작동하지 않는 것들에 대해 "302 Moved Temporarily"를 얻습니다. – Backer