개발 Q&A

제목 .htaccess 설정 처리
카테고리 서버
글쓴이 이나중마에노 작성시각 2022/05/04 11:28:11
댓글 : 6 추천 : 0 스크랩 : 0 조회수 : 3262   RSS

안녕하세요 고수님들

ubuntu apache2에서 서버를 띄우는데 루프를 돌다가 사이트가 안뜨고 에러나네요

mod_rewrite 를 설정하는데  index.php 부분은 아래와같이 처리를 했는데

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond $1 !^(index\.php|images|json|data|include|uploads|config|common|null|_capcha|_static|html|ax_text\.html|robots\.txt|favicon\.ico)

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.php/$1 [L]

</IfModule>

ajax.php 도 추가로 mod_rewrite 로 설정해야하는거 같은데 제가 설정해서 처리하는데 오류가 나고 안되네요

어떻게 처리해야하는지 고수님들 도움이 필요합니다

 

 

 다음글 모바일 웹에서 세션 (2)
 이전글 정기 결제 시스템 일자 문제 (3)

댓글

한대승(불의회상) / 2022/05/04 11:38:50 / 추천 0
무엇을 도와드려야 하나요?
이나중마에노 / 2022/05/04 11:41:14 / 추천 0

index.php 처럼 ajax.php 를 mod_rewrite 에 설정 하는 부분입니다 단순히

RewriteRule ^(.*)$ /ajax.php/$1 [L] 를 추가하면 에러가 나서요 

한대승(불의회상) / 2022/05/04 13:22:58 / 추천 0

RewriteRule ^(.*)$ /ajax.php/$1 [L]

추가하고

RewriteRule ^(.*)$ /index.php/$1 [L]

를 지우시면 오류 해결될겁니다.

이나중마에노 / 2022/05/04 14:42:01 / 추천 0
<IfModule mod_rewrite.c>
    RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|images|json|data|include|uploads|config|common|null|_capcha|_static|html|ax_text\.html|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /ajax.php/$1 [L]
</IfModule>
 
index.php 부분을 삭제하고 위와같이 했는데 안되네요
한대승(불의회상) / 2022/05/04 14:53:23 / 추천 0
@이나중마에노 고생이 많으시네요.
이나중마에노 / 2022/05/04 14:58:35 / 추천 0
이해가 가지 않는 상황이라서요