.htaccess 질문좀 드리겟습니다. 채택완료
#RewriteRule ^AAA_analysis/([0-9]+)$ ./index.php?mid=AAA_analysis&document_srl=$1 [L,QSA] #RewriteRule ^AAA ./index.php?req=index [L,QSA] AAA_analysis 밑에다가 AAA 룰을 넣어놨더니 상단의 AAA_analysis 가 AAA 페이지로 이동되는 증상이 있습니다. 룰셋을 어떻게 적용해야 할까요 ㅠㅠ?
참고로 아래는 XE 전체 룰입니다. RewriteEngine On RewriteRule ^NBA_analysis/([0-9]+)$ ./index.php?mid=NBA_analysis&document_srl=$1 [L,QSA] RewriteRule ^NBA ./index.php?req=index [L,QSA]
# deny access to files that may contain sensitive information RewriteRule ^(.*/)?\.(editor|git|ht|jshint|travis) - [L,F] RewriteRule ^(codeception(.*)\.yml|composer(.*)\.(json|lock)|package\.json)$ - [L,F] RewriteRule ^files/(attach|config|cache/store)/.+\.(ph(p|t|ar)?[0-9]?|p?html?|cgi|pl|exe|(a|j)sp|inc)$ - [L,F] RewriteRule ^files/(env|member_extra_info/(new_message_flags|point))/ - [L,F]
# reserve XE Layout Template Source File (*.html) RewriteRule ^(layouts|m.layouts|files/faceOff)/(.+)\.html$ - [L,F] # reserve XE Template Source Files (*.html) RewriteCond %{REQUEST_URI} !/modules/editor/ RewriteRule /(skins|m.skins)/(.+)\.html$ - [L,F]
# conf, query, schema RewriteRule ^(modules|addons|widgets)/(.+)/(conf|queries|schemas)/(.+)\.xml$ ./index.php [L]
# static files RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*) ./files/$2/$3 [L] RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.+)/(files|modules|widgets|widgetstyles|layouts|m.layouts|addons)/(.*) ./$2/$3 [L]
# rss , blogAPI RewriteRule ^(rss|atom)$ ./index.php?module=rss&act=$1 [L] RewriteRule ^([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?mid=$1&act=$2 [L] RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ ./index.php?vid=$1&mid=$2&act=$3 [L]
# trackback RewriteRule ^([0-9]+)/(.+)/trackback$ ./index.php?document_srl=$1&key=$2&act=trackback [L] RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?mid=$1&document_srl=$2&key=$3&act=trackback [L] RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&document_srl=$2&key=$3&act=trackback [L] RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ ./index.php?vid=$1&mid=$2&document_srl=$3&key=$4&act=trackback [L]
# document permanent link RewriteRule ^([0-9]+)$ ./index.php?document_srl=$1 [L,QSA]
# mid link RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([a-zA-Z0-9_]+)/?$ ./index.php?mid=$1 [L,QSA] # mid + document link RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?mid=$1&document_srl=$2 [L,QSA]
# vid + mid link RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ ./index.php?vid=$1&mid=$2 [L,QSA] # vid + mid + document link RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?vid=$1&mid=$2&document_srl=$3 [L,QSA]
# mid + entry title RewriteRule ^([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?mid=$1&entry=$2 [L,QSA] # vid + mid + entry title RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$ ./index.php?vid=$1&mid=$2&entry=$3 [L,QSA]
#shop / vid / [category|product] / identifier RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_\.-]+)$ ./index.php?act=route&vid=$1&type=$2&identifier=$3 [L,QSA]
답변 1개
작성하신 룰로
AAAA
AAA1
로 접속하면
./index.php?req=index 가 적용되어야 하나요?
정확히 AAA만 적용하시려면
RewriteRule ^AAA$ ./index.php?req=index [L,QSA]
AAA_ 를 제외하고 나머지를 적용하시려면
RewriteRule ^AAA[^_]* ./index.php?req=index [L,QSA]
AAA or AAAA or AAA1 or AAAA_an .... AAA로 시작하고 네번째문자가 _ 가 아닌 모든 것
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인