2016-09-12 2 views
0

에 액세스 할 슬래시를 내부 하위 폴더로 재 작성을 활성화하고 추가파일 내가 울부 짖는 소리의 URL 샘플을 다시 작성 htaccess로를 활성화해야

http://test.com/ -> /view/template/index.php RewriteBase/전망이다 > /view/template/post.php?id=12345

내가

012을 시도 -/템플릿/ 는

콘텐츠 URL이 http://test.com/post/12345 다른 파일이나 디렉토리의 CSS/JS 샘플을 다시 작성합니다

RewriteEngine on 

# Rewrite default Theme dir 
RewriteRule ^(.*)$ /app.view/assis/$1 [L,NC] 

RewriteRule ^(.*) $1 [L] 
RewriteRule ^post/$ /app.view/assis/post.php?id=31 [L] 

도와주세요.

+0

"나는 할 수 없습니다"<- 왜? – hjpotter92

+0

이 재 작성 규칙을 작성하는 데 도움이 필요합니다. tks – Jaccon

+0

[htaccess] (https://stackoverflow.com/documentation/.htaccess/topics) 및 [mod-rewrite] (https://stackoverflow.com/)에 대한 설명서를 확인하십시오. documentation/.htaccess/topics). [SO]는 "_ 내 코드를 작성하세요"웹 사이트가 아닙니다. 당신은 당신의 시도를 보여줘야합니다. # 다시 쓰기 기본 테마 DIR RewriteRule의 (^. *)에 $ /app.view/assis/$1 – hjpotter92

답변

0

나는 다음과 같은 규칙이 전혀 유용 생각하지 않는다 :

RewriteRule ^(.*) $1 [L] 

질문에 관해서는, 시도 :

RewriteRule ^/?$ /app.view/template/index.php [L] 

RewriteRule ^post/(\d+)/?$ /view/template/post.php?id=$1 [L] 
+0

게시물을 다시 올리면 OK이지만 인덱스 파일에는 적용되지 않습니다. /app.view/template/index.php에 다시 작성해야합니다. Tks – Jaccon