, 나는했습니다 쓰기,모드 재 작성 문제 아파치의 .htaccess 파일에
RewriteRule의이^동물 $의 index.php? 유형 = 동물
그것을 리디렉션 http://localhost/animalshttp://localhost/index.php?type=animals
언제까지 URL을 http://localhost/animals/으로 입력하면 파일을 찾을 수 없습니다.
RewriteRule ^animals/?$ index.php?type=animals
는 경로가 올바른지 기본 경로를 얻을? – Simone
페이지는'http : // localhost/animals /'와'http : // localhost/animals'에서 열리지 만'http : // localhost/animals /'를 사용하면 css, js 파일이로드되지 않습니다. 그러나 모든 것은'http : // localhost/animals'를 사용하여 완벽하게 작동합니다. –
@BhaveshGangani 당신은 css 및 js 파일에 대한 모든 참조 (및 다른 HTML 페이지에 대한 링크)가 프로젝트 경로에 절대적으로 포함되도록 HTML을 코딩해야합니다. 따라서 웹이 http://www.example.com/에 있다면 모든 파일 링크는'css/style.css'가 아닌'/ css/style.css'와 같아야합니다. 귀하의 페이지가 http://www.example.com/yoursite/에 있다면 모든 링크는'/ yoursite/css/style.css'와 같이되어야합니다. –