2011-11-02 4 views
0

안녕하십니까. 저는 현재 여러 가지 해결책을 가지고 있기 때문에 정말 고맙습니다. 제가 현재 문제를 해결할 수 있기를 바랍니다..htaccess에서 URL을 다시 작성하는 방법

의 URL은 URL "73", "2", "1"내가 다음과 같은 htaccess로 파일을 다시 시도 값

있는이

www.xyz.com/c73-Graphic-Desgin?resultpage=2&aid=1 

같지만, 그렇지 않습니다 ...

RewriteEngine On 
RewriteRule ^c(.+)-(.+)-(.+)?resultpage=(.+)&aid=(.+)/?$ template.php?cid=$1&resultpage=$4&aid=$5&search=yes 

을 작업하는 ... 저를 사전에이 문제를 감사를 해결하기 위해

내 .htacces 도와주세요 파일

RewriteEngine On 

#RewriteRule ^article/(.*)?$ article.php?aid=$1 
#RewriteRule ^knowledge_base/([0-9]+)/(.*)?$ knowledge_base.php?p=$1&cid=$2 
RewriteRule ^(.*)-article?$ article_detail.php?artid=$1 

RewriteRule ^t([0-9]+)-(.+)/?$ temlate_detail.php?tid=$1 

RewriteRule ^c([0-9]+)-sc([0-9]+)-(.+)/?$ templates.php?cid=$1&&scid=$2 
RewriteRule ^c([0-9]{1,2})[a-zA-Z-]+?resultPage=([0-9]+)&aid=([0-9]+)$ templates.php?cid=$1 


RewriteRule ^ac([0-9]+)-(.+)/?$ articles.php?cid=$1 
RewriteRule ^p-(.*)$ pages.php?pageid=$1 

#For PHP files: 

RewriteCond %{REQUEST_FILENAME} !-s 
RewriteRule ^(index|about|faq|freelancers|articles|contact|affiliates|login|forgot_password|change_password|cart|order_view|checkout|checkout_response|success|downloads|order_detail)(/.*)?$ $1.php 
#php_value display_errors Off 
#php_value upload_max_filesize 2000M 
#php_value post_max_size 2000M 
Options All -Indexes 

답변

0

정규식이 잘못되었습니다.이 같은 것을 사용할 수 있습니다. 빠른 회신

^c([0-9]{1,2})[a-zA-Z-]+?resultPage=([0-9]+)&aid=([0-9]+)$ //put here whatever u like to with $1, $2, $3 and $4 
+0

덕분 .. 제가 이 RewriteRule의 C^같은 시도 ([0-9] {1,2}) A-ZA-Z -]? resultPage + = ([0 (0-9) +) $ templates.php? cid = $ 5 그러나 그것도주는 오류 :( – rkaartikeyan

+0

무엇입니까? –

+0

https://www.magiktemplates.com/c73 -Graphic-Desgin? resultpage = 2 & aid = 1 링크를보십시오 ... 그것의 포기한 오류 .. 선생님 – rkaartikeyan

관련 문제