rewrite rule 질문드립니다.. 정보
rewrite rule 질문드립니다..
본문
이것저것 해봤는데 잘 되지 않네요..ㅜ;
리라이트 룰좀 짜주시면 감사하겠습니다..ㅜ;
domain.com 이 있을때요,,
domain.com 으로 접속하면, index.php
domain.com/rss 으로 접속하면, rss.php
domain.com/com 으로 접속하면, company.php
domain.com/* 로 접속하면, index.php 로 나왔으면 좋겠습니다.
RewriteRule ^(.*)$ index.php [L]
위 처럼 하니까 domain.com/* 은 index.php 로 이동되긴 하는데
나머지 것들은 아무리 해봐도 잘 안되네요..ㅜ;
부탁좀 드리겠습니다.
리라이트 룰좀 짜주시면 감사하겠습니다..ㅜ;
domain.com 이 있을때요,,
domain.com 으로 접속하면, index.php
domain.com/rss 으로 접속하면, rss.php
domain.com/com 으로 접속하면, company.php
domain.com/* 로 접속하면, index.php 로 나왔으면 좋겠습니다.
RewriteRule ^(.*)$ index.php [L]
위 처럼 하니까 domain.com/* 은 index.php 로 이동되긴 하는데
나머지 것들은 아무리 해봐도 잘 안되네요..ㅜ;
부탁좀 드리겠습니다.
댓글 전체
제가 썻던 방법입니다. 참고 하시고 사용 바랍니다.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/$ /home/etcnews/public_html/$1.php?session_id=$2 [L]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ /home/etcnews/public_html/$1.php?session_id=$2&num=$3 [L]
Redirect /read/10000/ http://www.newsgate.co.kr/read.php?session_id=10000&num= [L]
Redirect /read/20000/ http://www.newsgate.co.kr/read.php?session_id=20000&num= [L]
Redirect /read/30000/ http://www.newsgate.co.kr/read.php?session_id=30000&num= [L]
Redirect /read/40000/ http://www.newsgate.co.kr/read.php?session_id=40000&num= [L]
Redirect /read/50000/ http://www.newsgate.co.kr/read.php?session_id=50000&num= [L]
Redirect /read/60000/ http://www.newsgate.co.kr/read.php?session_id=60000&num= [L]
Redirect /read/80000/ http://www.newsgate.co.kr/read.php?session_id=80000&num= [L]
Redirect /read/130000/ http://www.newsgate.co.kr/read.php?session_id=130000&num= [L]
Redirect /read/230000/ http://www.newsgate.co.kr/read.php?session_id=230000&num= [L]
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/$ /home/etcnews/public_html/$1.php?session_id=$2 [L]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ /home/etcnews/public_html/$1.php?session_id=$2&num=$3 [L]
Redirect /read/10000/ http://www.newsgate.co.kr/read.php?session_id=10000&num= [L]
Redirect /read/20000/ http://www.newsgate.co.kr/read.php?session_id=20000&num= [L]
Redirect /read/30000/ http://www.newsgate.co.kr/read.php?session_id=30000&num= [L]
Redirect /read/40000/ http://www.newsgate.co.kr/read.php?session_id=40000&num= [L]
Redirect /read/50000/ http://www.newsgate.co.kr/read.php?session_id=50000&num= [L]
Redirect /read/60000/ http://www.newsgate.co.kr/read.php?session_id=60000&num= [L]
Redirect /read/80000/ http://www.newsgate.co.kr/read.php?session_id=80000&num= [L]
Redirect /read/130000/ http://www.newsgate.co.kr/read.php?session_id=130000&num= [L]
Redirect /read/230000/ http://www.newsgate.co.kr/read.php?session_id=230000&num= [L]
</IfModule>
응용해보아도 안되네요..
혹시 특정문자를 제외한 나머지(*) 를 index.php 로 연결시킬수 있을까요?
그러면 그 특정문자를 따로 등록해주면 될것같아서요.
혹시 특정문자를 제외한 나머지(*) 를 index.php 로 연결시킬수 있을까요?
그러면 그 특정문자를 따로 등록해주면 될것같아서요.