| 제목 | .htaccess에서 https로 강제하는데 위에 index.php? 이게 따라나옵니다 ㅜㅜ | ||
|---|---|---|---|
| 카테고리 | 서버 | ||
| 글쓴이 | 스노우퀸 | 작성시각 | 2018/01/21 11:56:02 |
|
|
|||
|
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule . https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent] RewriteCond $1 !^(index\.php|robots\.txt|static|people.txt|vendor|bower_components|upload_file) RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule>
www.lcr.zone을 치고 들어가면 위와 같이 나오네요. 그런데 사이트내에서 링크를 타고 이동하면 index.php?이게 없어져요.
처음에 접속할때 www.lcr.zone쳤을때만 그래요 ㅜㅜ |
|||
| 다음글 | jQuery 질문 (2) | ||
| 이전글 | 여러가지 선택 할 경우 (4) | ||
|
네이처그린
/
2018/01/21 15:44:02 /
추천
0
|
안녕하세요
제가 사용하는건데 한번 테스트 해보세요;
예전에 세팅해두고 경로만 바꾸고 계속 복붙해서 쓰는거라;;
<IfModule mod_rewrite.c> # Turn on URL rewriting RewriteEngine On # If your website begins from a folder e.g localhost/my_project then # you have to change it to: RewriteBase /my_project/ # If your site begins from the root e.g. example.local/ then # let it as it is RewriteBase /폴더명/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Protect application and system files from being viewed when the index.php is missing RewriteCond $1 ^(application|system|private|logs) # Rewrite to index.php/access_denied/URL RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L] # Allow these directories and files to be displayed directly: RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|public|assets|css|js|images) # No rewriting RewriteRule ^(.*)$ - [PT,L] # Rewrite to index.php/URL RewriteRule ^(.*)$ index.php/$1 [PT,L] </IfModule>