2012-07-19 2 views
0

작동하지 않는 하나 이상의 규칙을 다시 작성, 다음과 같은 몇 가지 성공했다 htaccess로 :내가 재 작성 작업을 수행하는 방법에 대한 몇 가지 자원을 읽었

RewriteEngine On 
RewriteBase /~me/website.net/html/ 
RewriteCond %{SCRIPT_FILENAME} !-f 
RewriteCond %{SCRIPT_FILENAME} !-d 
RewriteRule ^(.*)$ property.php?property=$1 

을 ...하는 I 아마 돈 '는 t는 ... 당신이 변환 말할

http://imac-i3.local/~me/website.net/html/property-name 

...에를 .... 필요

http://imac-i3.local/~me/website.net/html/property.php?property=property-name  

상관없이 나는 다음 페이지를 알아낼 수 없습니다 읽어 얼마나 어떤 도움이 가장 기꺼이받을 것

http://imac-i3.local/~me/website.net/html/1 
http://imac-i3.local/~me/website.net/html/property/property-name 

으로 ...

http://imac-i3.local/~me/website.net/html/index.php?page=1 
http://imac-i3.local/~me/website.net/html/property.php?property-name 

I 변환되는해야 할 일의 하세 ....

답변

0

당신은에 RewriteRule ^(.*)$ property.php?property=$1에서 규칙을 변경하려면 :

RewriteRule ^property/(.*)$ property.php?property=$1 [L] 

그리고 (당신이 이미 가지고있는 규칙 후 수 있습니다) 페이지 매김이 추가 :

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^([0-9]+)$ index.php?page=$1 [L] 
관련 문제