<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>글걸이: Apache-RewriteRule을-이용한-주소-이동에 달린 최근 덧글/걸린글 목록</title>
		<link>https://pat.im/</link>
		<description>적어도 한 발은 느린 뒷북 블로그</description>
		<language>ko</language>
		<pubDate>Wed, 15 Oct 2025 20:31:52 +0900</pubDate>
		<generator>Textcube 2.0.0 : Beta 3 : inquieto</generator>
		<item>
			<title>부사리님의 덧글</title>
			<link>https://pat.im/461#comment67541</link>
			<description>좋은 정보 정말 감사합니다. 덕분에 
도메인 변경문제가 해결되었습니다. ^^:</description>
			<author>부사리</author>
			<guid>https://pat.im/461#comment67541</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Thu, 17 Dec 2009 11:26:03 +0900</pubDate>
		</item>
		<item>
			<title>팥빙산님의 덧글</title>
			<link>https://pat.im/461#comment67542</link>
			<description>네.^^</description>
			<author>팥빙산</author>
			<guid>https://pat.im/461#comment67542</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Thu, 17 Dec 2009 15:05:29 +0900</pubDate>
		</item>
		<item>
			<title>팥빙산님의 덧글</title>
			<link>https://pat.im/461#comment67543</link>
			<description>kurapa.com의 글은 알기 쉽게 정리되어 있어서 저도 참고했었습니다.
구글에선 R=301로 이동하는 걸 권장하고 있고 갱신이 빠른 편이던데,
야후나 다른 검색기는 모르겠습니다.
블로그 검색에 등록했다면 모든 글 주소를 고치는 게 쉽지 않아서 좀 골치가 아프더군요.
모든 검색기가 구글처럼 똑똑하다면 수월할 텐데요.^^</description>
			<author>팥빙산</author>
			<guid>https://pat.im/461#comment67543</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Thu, 17 Dec 2009 15:37:40 +0900</pubDate>
		</item>
		<item>
			<title>chief님의 덧글</title>
			<link>https://pat.im/461#comment67548</link>
			<description>안녕하세요..
제가 이쪽에 너무 약해서여 글읽어도 이해가 잘 안되네여 ㅠㅠ
아 사실 제가 도메인이 외국스팸봇에 털렸나봅니다. 일방문객이 2000명이 넘어염..
순방문객은 한 100명이하로 추측하고 나머지는 스팸봇으로 생각하고 있습니다.

그래서 블로그 디렉토리를 옮겼습니다. 
하지만 doctype.kr 접속시 doctype.kr/home 으로 자동이동시키면 또 엄청나게
봇들이 침투하더라고요 ㅠㅠ 스팸댓글휴지통에 엄청나게 쌓입니다 ㅠ.ㅠ

혹시 doctype.kr 까지는 doctype.kr/home 일루 자동이동못하고,,,
doctype.kr/33 이처럼 하위에 숫자나 영문이 붙은경우만 doctype.kr/home/33 으로
이동시키는것두 가능한지 질문드려봅니다.
그리고 아 doctype.kr 이거 아까워 죽겠습니다 ㅠ
의미가 없어지네여.. 봇들침투땀시 ㅡ.ㅠ
활용할방법이 정녕없이 버려야하는건지 ㅡ.ㅡ

늦었지만 새해복마니받으세요~~~</description>
			<author>chief</author>
			<guid>https://pat.im/461#comment67548</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Sun, 06 Jan 2013 15:56:21 +0900</pubDate>
		</item>
		<item>
			<title>팥알님의 덧글</title>
			<link>https://pat.im/461#comment67549</link>
			<description>스팸 덧글, 참 골치 아프죠. 그래도 스팸 거르개 플러그인이 잘 작동해서 휴지통에 알아서 들어간다면 크게 걱정할 문제는 아닐 것 같습니다. 휴지통에 쌓이는 글은 얼마 지나면 지워지니, 스팸이 아닌 글이 휴지통에 들어가는 것만 신경 쓰면 되지 않을까 생각합니다.

어느 블로그나 검색이 될 만큼 알려지면 스팸은 자연스럽게 들어오더군요. 어차피 블로그 주소는 공개되어 있으니, 굳이 스팸 봇을 피하려고 블로그 주소나 경로를 바꿀 필요는 없을 것 같습니다. 웬만한 스팸 글들은 텍스트큐브에 들어 있는 FAS 플러그인이나 Draco 안티 스팸 플러그인으로 휴지통으로 보내고, 그래도 안 되는 건 텍스트큐브의 스팸 필터 기능으로 특정 아이피 대역이나 제목/내용에 들어가는 낱말을 거르는 방법으로 막으면 될 것 같습니다. 

/33처럼 숫자로 이루어진 글 주소와 /entry/가 붙은 제목 주소만 /home/???로 보내려면 .htaccess 파일에

RewriteRule ^([0-9]+|(entry/[^/]+)) /home/$1 [R=301,L]

처럼 적어 주면 될 것 같습니다. 간단히 이 식을 실험은 해 보았지만, 저도 정규식 메타 문자 쓰는 것이 돌아서면 잊을 만큼 어렵고 자꾸 제가 써 놓은 글까지 참고하는 형편이어서 잘 되는지는 확인이 필요합니다. 위 식에서 [^/]+는 빗금(/)이 붙지 않은 문자열을 뜻합니다.</description>
			<author>팥알</author>
			<guid>https://pat.im/461#comment67549</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Sun, 06 Jan 2013 18:03:10 +0900</pubDate>
		</item>
		<item>
			<title>chief님의 덧글</title>
			<link>https://pat.im/461#comment67551</link>
			<description>빠른답변감사합니다.
리퍼러기록에보면 http://doctype.kr/ 로 너무 많이 쌓여서 정말 지저분하고 방문객 카운트가 기이할정도로 올라가며 호스팅업체에서는 트래픽초과직전이라는 경고문자도 자주오고 정말 뭘 잘못했는지 모르겠네여 ㅠㅠ
아무튼 htaccess 관련 도움 감사드립니다.</description>
			<author>chief</author>
			<guid>https://pat.im/461#comment67551</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Sun, 06 Jan 2013 23:27:11 +0900</pubDate>
		</item>
		<item>
			<title>팥알님의 덧글</title>
			<link>https://pat.im/461#comment67552</link>
			<description>전송량 문제라면 정말 고민스러우시겠네요. 저는 블로그 내용을 gzip로 압축 전송하는 방법으로 전송량을 줄이고 있습니다.

텍스트큐브만 쓴다면 gzip 압축 전송 플러그인을 써서 전송량을 줄이는 방법이 전송량 아끼기에는 가장 쉬우면서 효과가 클 것 같습니다.

http://offree.net/613

브라우저 캐시 기한을 길게 잡는 설정도 전송량을 줄이는 데에 도움이 될 겁니다. 아파치 서버에 mod_expires가 작동하고 있다면 .htaccess 파일에서 캐시 기한을 설정할 수 있는 것 같습니다.

http://www.themepremium.com/leverage-browser-caching-on-wordpress-using-htaccess-file/

여기에다 minify라는 도구로 css와 js 파일을 압축해 보낸다면, 전송량이 더 줄어들겠지요. minify를 쓰려면 .htaccess를 조금 만져야 합니다.

http://pat.im/657</description>
			<author>팥알</author>
			<guid>https://pat.im/461#comment67552</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Mon, 07 Jan 2013 00:01:23 +0900</pubDate>
		</item>
		<item>
			<title>안녕하세요님의 덧글</title>
			<link>https://pat.im/461#comment89102</link>
			<description>위의 예들을 하나하나 적용해 보았는데 리다이렉션이 너무 많다고하면서 

크롬과 IE 10등에서 접속이 안되는데요 혹시 해결 방법이 있을까요</description>
			<author>안녕하세요</author>
			<guid>https://pat.im/461#comment89102</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Tue, 17 Feb 2015 20:01:45 +0900</pubDate>
		</item>
		<item>
			<title>팥알님의 덧글</title>
			<link>https://pat.im/461#comment89103</link>
			<description>잘못 적용해서 꼬이면 그럴 수 있습니다.
어떻게 적용하려고 했는지 자세히 알려 주셔야 답을 드릴 수 있겠는데요.</description>
			<author>팥알</author>
			<guid>https://pat.im/461#comment89103</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Tue, 17 Feb 2015 20:49:50 +0900</pubDate>
		</item>
		<item>
			<title>자바를자바라님의 덧글</title>
			<link>https://pat.im/461#comment90735</link>
			<description>안녕하세요 검색하다 들어왔는데
제가 찾던 그런 글이네요 
좋은 정보 감사합니다. 도움이 되었습니다 ㅎㅎ</description>
			<author>자바를자바라</author>
			<guid>https://pat.im/461#comment90735</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Fri, 21 Aug 2015 18:09:48 +0900</pubDate>
		</item>
		<item>
			<title>안녕하세요님의 덧글</title>
			<link>https://pat.im/461#comment91228</link>
			<description>질문 하나만 드려도 될까요??

www.aaa.com으로 url을 입력했을 경우 www.aaa.com/test.jsp 로 
리다이렉트하려면 어떻게 해야할까요 ..ㅠㅠ

RewriteEngine On
RewirteCond %{HTTP_HOST} ^aaa.com$ [NC]
RewriteRule ^/(.*) http://www.aaa.com/test.jsp 

위와 같이 설정했을 경우 만먹히네요..

또하나 여쭤보고 싶은게 directoryIndex가 test.jsp로 설정되어 있는데
rewriteRule을 쓰면 웹서버 directoryIndex의 test.jsp 가 아닌
was의 test.jsp로 리다이렉트가 되게 할수가 있을까요?</description>
			<author>안녕하세요</author>
			<guid>https://pat.im/461#comment91228</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Tue, 20 Oct 2015 11:29:14 +0900</pubDate>
		</item>
		<item>
			<title>팥알님의 덧글</title>
			<link>https://pat.im/461#comment91236</link>
			<description>웹 서버에서 www.aaa.com 과 www.aaa.com/ 을 다른 경로로 받아들일 수 있는데요.

RewriteRule (.*) http://www.aaa.com/test.jsp

로 바꾸어 보시면 어떨까 싶네요.

JSP는 많이 써 보지 않아서 아는 것이 적은데, WAS 구성이나 경로가 어떻게 되는지 몰라서 답변 드리기가 어렵네요.</description>
			<author>팥알</author>
			<guid>https://pat.im/461#comment91236</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Wed, 21 Oct 2015 00:26:52 +0900</pubDate>
		</item>
		<item>
			<title>안녕하세요님의 덧글</title>
			<link>https://pat.im/461#comment105513</link>
			<description>안녕하세요? 위에 있는것들을 조합해서 사용해봐도 자꾸 에러가나서 질문 하나만 드려도 될까요ㅜㅜ?

저는 https://aaa.com/aaa 로 접속했을 때, https://aaa.com/aaa.php 로 리다이렉트 시키고 싶은데 

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(https://aaa\.com/aaa)
RewriteRule (.*)  /aaa.php/$1  [L]

이 방법으로 되지 않더라구요 .. 혹시 어떻게 해야 위와 같이 리다이렉트를 시킬 수 있을까요 ㅜㅜ</description>
			<author>안녕하세요</author>
			<guid>https://pat.im/461#comment105513</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Wed, 17 Jan 2018 15:28:44 +0900</pubDate>
		</item>
		<item>
			<title>팥알님의 덧글</title>
			<link>https://pat.im/461#comment105514</link>
			<description>RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^(aaa\.com)
RewriteRule ^aaa$ https://aaa.com/aaa.php [L]

이런 식으로 해야 하지 않겠나 싶네요.
도메인 주소를 하나만 쓴다면 RewriteCond는 쓰지 않아도 됩니다.
RewriteRule에는 상대 주소를 써도 됩니다.
%{HTTP_HOST}로는 http나 https를 가릴 수 없고, RewriteRule에서 https와 http 가운데 골라서 보낼 수는 있습니다.</description>
			<author>팥알</author>
			<guid>https://pat.im/461#comment105514</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Thu, 18 Jan 2018 12:05:33 +0900</pubDate>
		</item>
		<item>
			<title>buriburi님의 덧글</title>
			<link>https://pat.im/461#comment105515</link>
			<description>안녕하세요.

현재 한개의 도메인에 두개의 독립 사이트 운영을 고민 하고 있습니다.

aaaa.kr은 원래 웹호스팅관 연결된 도메인

bbbb.kr은 웹호스팅에 추가하고 싶은 도메인입니다.

.htaccess 파일을 수정해 

RewriteCond %{HTTP_HOST} ^(aaaa.kr)$ [NC]
RewriteCond $1 !^/
RewriteRule ^(.*)$ /$1 [L]
RewriteRule . /index.php [L]

RewriteCond %{HTTP_HOST} ^(bbbb.kr)$ [NC]
RewriteCond $1 !^(bbbb)/
RewriteRule ^(.*)$ /bbbb/$1 [L]

두사이트가 각각의 도메인으로 접속하면 정상적으로 호출이 가능합니다.

하지만 http://bbbb.kr/1/1.png(실제 경로: http://aaaa.kr/bbbb/1/1.png) 이런식으로 호출을 하면 호출인 안되고 있습니다.

위 문제를 해결 할 방법은 없을까요?</description>
			<author>buriburi</author>
			<guid>https://pat.im/461#comment105515</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Tue, 30 Jan 2018 10:58:56 +0900</pubDate>
		</item>
		<item>
			<title>팥알님의 덧글</title>
			<link>https://pat.im/461#comment105516</link>
			<description>뿌리 경로를 똑같이 쓸 때에는 두 도메인 주소를 함께 운영할 수도 있겠지만, 웹 호스팅 수준에서 .htaccess 파일만으로 두 도메인 주소를 운영하는 건 번거롭습니다. 꼭 그렇게 해야 한다면, 주소 변환보다는 도메인에 따라 특정 경로 접속을 허용하고 불허하는 방법이 더 깔끔할 것 같습니다.

서버 호스팅을 받거나 웹 서버를 손수 운영하는 때에는 가상 호스트(virtualhost) 설정으로 도메인에 따라 뿌리 경로부터 다르게 처리할 수 있습니다.</description>
			<author>팥알</author>
			<guid>https://pat.im/461#comment105516</guid>
			<comments>https://pat.im/461#comment</comments>
			<pubDate>Wed, 31 Jan 2018 03:05:14 +0900</pubDate>
		</item>
	</channel>
</rss>
