2012-11-22 2 views
0

내 URL : http : //www.example.com/home.php 최종 사용자가 내 사이트를 내비게이션 http://www.example.com/home으로 표시 할 때 표시하고 싶습니다. .htaccess 파일을 통해이 작업을 수행 할 수 있음을 알고 있습니다. 아무것도 htaccess로 믿을수 위의 코드를 발생하지확장자없이 .php 파일을 표시하고 싶습니까?

Following is the htacces file: 
RewriteEngine On 
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}.php -f 
RewriteRule ^(.+)$ $1.php 

+3

.htaccess 파일의 처리를 활성화했는지 확인하십시오. 로그 파일에 액세스 할 수 있습니까? htaccess 파일은 어디에 위치해 있습니까? – arkascha

+0

검색 기능을 사용하십시오. 많은 중복 저작물 중 하나 : http://stackoverflow.com/questions/7498410/short-url-system-how-to-redirect-the-custom-urls – Peon

+0

중복 콘텐츠에주의하십시오. 물리적으로 사용자를 비 확장 버전 – Dunhamzzz

답변

1

<IfModule mod_rewrite.c> 
    RewriteEngine on 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME}\.php -f 
    RewriteRule ^(.*)$ $1.php 
</IfModule> 
을 시도하는 방법을 나에게 제안 .PHP extension.Can 사람없이 전체 사이트 페이지를 표시 할
관련 문제