테스트 사이트 - 개발 중인 베타 버전입니다

rewrite rule 질문드립니다..

· 14년 전 · 1531 · 2
이것저것 해봤는데 잘 되지 않네요..ㅜ;

리라이트 룰좀 짜주시면 감사하겠습니다..ㅜ;

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 로 이동되긴 하는데
나머지 것들은 아무리 해봐도 잘 안되네요..ㅜ;

부탁좀 드리겠습니다.

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

제가 썻던 방법입니다. 참고 하시고 사용 바랍니다.
<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 로 연결시킬수 있을까요?
그러면 그 특정문자를 따로 등록해주면 될것같아서요.

게시글 목록

번호 제목
284508
284499
284492
284490
284484
284481
284478
284476
284474
284472
284470
284458
284457
284454
284453
284447
284446
284444
284441
284440