/domains이거나 example.com이 별칭이고 동일한 IP이고 동일한 Apache 가상 호스트에서 제공된 경우 내부 재 작성을 사용할 수 있습니다. 더 많은 정보 HERE
당신도 이것을 시도 할 수 있습니다. 더 INFOR에 대한 http://domain.com/ 또는 http://domain.com/index.php의 요청을 HERE
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^/?(index.\php)?$ /category [L]
이 단지 작품을 이동하면 주소 표시 줄에 URL을 변경하지 않고 http://domain.com/category에 컨텐츠를 제공받을 것입니다. 필요하지 않으면 RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$
[NC] 행을 잃어 버릴 수도 있습니다.
도 http://test.example.com/의 내용을 서버로 빠른 응답 mayur에 대한 here
RewriteEngine on
RewriteBase/
######## example.com ########
RewriteCond %{HTTP_HOST} ^.*example.com$ [NC]
RewriteCond /www/quux-foo.com/www/root/v1%{REQUEST_URI} -d
RewriteRule ^(.*[^/])$ %{REQUEST_FILENAME}/ [L]
RewriteCond %{HTTP_HOST} ^.*quux-foo.com$ [NC]
RewriteCond %{REQUEST_URI} ^/v1/
RewriteRule ^(.*)$ - [F]
RewriteCond %{HTTP_HOST} ^.*example.com$ [NC]
RewriteCond /www/quux-foo.com/www/root/v1%{REQUEST_URI} -f [OR]
RewriteCond /www/quux-foo.com/www/root/v1%{REQUEST_URI} -d
RewriteRule ^(.*)$ v1/$1 [L]
RewriteCond %{HTTP_HOST} ^.*example.com$ [NC]
RewriteCond %{REQUEST_URI} !^/v1/
RewriteRule ^(.*)$ v1/index.php [L]
######## example.com ########
덕분에, 내가 http://example.com/test를 원하는 유용한 자원이 리디렉션 코드가 필요합니다. index.php를 헤더 코드가있는 카테고리 폴더에 배치하여 webiste를 리디렉션 할 수 있습니다. 그러나 나는 어떤 URL을 바꿀 지 모른다. URL을 http://example.com/test로 표시해야합니다. – Srikanth1239