프로그램 사용/apache2017. 4. 12. 09:43

에러로그 설정하고 보는데 먼소리인지 모르겠다 ㅠㅠ

일단 규칙은 아래와 같이 들어온 주소를 index.php?url="어쩌구" 식으로 바꾸어 주는건데

문제는 ^(.+)$ ...

처음부터 끝까지 내용이 없던 머던 상관없는데 이걸 $1로 치환하라 인데

Options -MultiViews

RewriteEngine On

Options -Indexes

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L] 


현재 읽혀 있는 경로에서 달라지는 내용만을 적용대상으로 삼는건가?

/var/www/html/arch/test/index.php 에서 있는 파일은 웹상으로 접속하면

http://localhost/arch/test 인데, 이 파일에서 링크된 다른 경로

arch/test/board는 이전 주소를 기본으로 볼때 board가 하나 추가 된 셈이니

test 이후의 board만 들어가서 rewrite rule에 적용을 받는건가?

 [perdir /var/www/html/arch/test/] add path info postfix: /var/www/html/arch/test/board -> /var/www/html/arch/test/board/, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] strip per-dir prefix: /var/www/html/arch/test/board/ -> board/, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] applying pattern '^(.+)$' to uri 'board/', referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] rewrite 'board/' -> 'index.php?url=board/', referer: http://localhost/arch/test/board/

 split uri=index.php?url=board/ -> uri=index.php, args=url=board/, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] add per-dir prefix: index.php -> /var/www/html/arch/test/index.php, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] strip document_root prefix: /var/www/html/arch/test/index.php -> /arch/test/index.php, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] internal redirect with /arch/test/index.php [INTERNAL REDIRECT], referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] strip per-dir prefix: /var/www/html/arch/test/index.php -> index.php, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] applying pattern '^(.+)$' to uri 'index.php', referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] pass through /var/www/html/arch/test/index.php, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] strip per-dir prefix: /var/www/html/arch/test/public/css/style.css -> public/css/style.css, referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] applying pattern '^(.+)$' to uri 'public/css/style.css', referer: http://localhost/arch/test/board/

 [perdir /var/www/html/arch/test/] pass through /var/www/html/arch/test/public/css/style.css, referer: http://localhost/arch/test/board/ 


[링크 : http://webskills.kr/archives/515]


+

QSA는 Cond를 지난 결과에 덧 붙인다라는 의미..

음.. 경로의 마법은 저 Cond와 QSA인가?

[링크 : http://soul0.tistory.com/208]


+

REQUEST_FILENAME

The full local filesystem path to the file or script matching the request, if this has already been determined by the server at the time REQUEST_FILENAME is referenced. Otherwise, such as when used in virtual host context, the same value as REQUEST_URI. Depending on the value of AcceptPathInfo, the server may have only used some leading components of the REQUEST_URI to map the request to a file.


REQUEST_URI

The path component of the requested URI, such as "/index.html". This notably excludes the query string which is available as its own variable named QUERY_STRING.

[링크 : http://httpd.apache.org/docs/current/mod/mod_rewrite.html]


Filename should give you the complete local path, where request uri will be exactly what was requested (should also include the GET parameters). From the manual:

REQUEST_URI

The resource requested in the HTTP request line. (In the example above, this would be "/index.html".)

REQUEST_FILENAME

The full local filesystem path to the file or script matching the request. 

[링크 : http://www.miva.com/...-htaccess-what-s-the-difference-between-request_filename-and-request_uri]

Posted by 구차니
프로그램 사용/apache2017. 4. 12. 09:30

테스트를 해보니.. apache 전역 환경설정에서 해야 하고

로컬 .htaccess에 설정하면 에러가 발생한다.

[Wed Apr 12 09:14:03.530865 2017] [core:alert] [pid 30981] [client 0.0.0.0:3628] /var/www/html/arch/test/.htaccess: LogLevel not allowed here 


아파치 2.4 이후

LogLevel alert rewrite:trace3

[링크 : http://httpd.apache.org/docs/current/mod/mod_rewrite.html]


아파치 2.2 이전

RewriteEngine on

RewriteLog /path/to/log

RewriteLogLevel 5 

[링크 : https://wiki.apache.org/httpd/RewriteLog]



그나저나 한 페이지 로딩할때 이미지나 css 등 개별파일들 전부 적용되서 로그가 남는구나 ㄷㄷ

Posted by 구차니

간단요약.

COM3의 경우 윈도우에서 시리얼 마우스로 자동 탐지를 하는데

USB to RS232 등을 COM3로 사용시

M이나 B를 인식하면서 마우스 클릭하거나 이상하게 이동하는 문제가 발생을 한다.


시리얼 마우스 서비스를 종료하거나

해당 포트를 열거하지 않도록 함으로서 해결 가능


[링크 : http://stackoverflow.com/questions/9226082/device-misdetected-as-serial-mouse]

[링크 : http://www.taltech.com/support/entry/windows_2000_nt_serial_mice_and_missing_com_port]

[링크 : http://www.sealevel.com/.../How-to-fix-crazy-mouse-syndrome-with-USB-serial-adapters.html]

'모종의 음모 > Win32 시리얼' 카테고리의 다른 글

MFC 시리얼 포트 관련  (0) 2017.05.17
mfc readfile timeout 설정  (0) 2017.04.06
mfc win32 시리얼  (0) 2017.04.05
시리얼 baudrate 목록  (0) 2017.04.05
win32 시리얼 포트 목록 얻기  (0) 2017.04.05
Posted by 구차니

검색해도 이거 밖에 언급된 내용을 못 찾음 ㅜㅜ

아무튼 노트2는 안되고

3나 4의 롤리팝/마시멜로우 부터 정식적용 된 듯?


[링크 : https://ko-kr.facebook.com/permalink.php?story_fbid=634271276655585&id=427271000688948]

Posted by 구차니
프로그램 사용/apache2017. 4. 11. 19:54

기본값으로는 해당 모듈이 활성화 되어 있지 않았네...


$ cd /etc/apache2/mods-enabled

$ sudo ln -s ../mods-available/rewrite.load rewrite.load 




+

Directory 항목중 AllowOverride all 를 해주지 않으면

파일로 저장된 .htaccess를 적용되지 않는 것으로 보인다.

[링크 : http://zetawiki.com/wiki/하위폴더_.htaccess_설정]

'프로그램 사용 > apache' 카테고리의 다른 글

mod_rewrite 테스트..  (4) 2017.04.12
mod_rewrite 로그설정  (0) 2017.04.12
mod_rewrite 설정 및 정규표현식  (0) 2017.04.10
apache mod_deflast mod_gzip  (0) 2017.01.23
무료 ssl 인증서 - lets encrypt  (2) 2017.01.20
Posted by 구차니
파일방2017. 4. 11. 16:23

'파일방' 카테고리의 다른 글

코드 라인수 측정 - loc(line of code)  (0) 2017.06.07
gaussian (화학)  (0) 2017.05.10
챗봇 관련 링크  (2) 2017.03.28
openALPR -Automatic License Plate Recognition  (0) 2017.02.28
시리얼 hex 전송 유틸  (0) 2017.02.21
Posted by 구차니

근 10% 올랐다고 보면 되겠네

와.. 1년 이면 한달치 더 내는 수준.. 미친 -_-

Posted by 구차니
프로그램 사용/apache2017. 4. 10. 15:31
개소리 왈왈/자전거2017. 4. 10. 10:18

신청하다가 카드결제 했더니 튕기고

확인하려니 암호에 * 표시도 안되더니 실시간 홈페이 업데이트 ㅋㅋㅋ


아무튼 신청 완료!


Posted by 구차니

4월 10일 10시!

당연히 C그룹으로 신청해야지 ㅠㅠ


정말 이번엔 낙오할지도 모르겠네 ㅠㅠ



Posted by 구차니