다음 문제가 발생했습니다. 이 URL이 www.mysite.com/inde.php?SomePageName 이며 www.mysite로 다시 작성하고 싶습니다. .com/SomePageName URL을 params (예 : mysite.com/index.php 또는 mysite.com/index.php)없이 호출하면 index.php를 제거하고 싶습니다.URL에서 index.php 및 index.php 쿼리 문자열을 제거하십시오.
내 htaccess로 파일을 mysite.com/로 리디렉션해야 할 것은 다음과 같습니다
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(index\.php)?\?([^&\ ]+)
RewriteRule^/%2? [L,R=302]
RewriteRule ^index.php$ http://www.mysite.com/ [R=302,L]
는 이제 때문에 마지막 선언의 루프를하고있어.
나는 이것을 달성 할 수있는 방법이 있습니까?
감사
PS : 그것은 나 이후 인 경우
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^cumpara-(.*)-(.*)\.html$ index.php?Profile&ID=$2 [L]
RewriteRule ^lista-scut-motor-metalic-(.*)-(.*)-(.*)\.html$ index.php?List&SubID=$3&Categorie=$1&Subcategorie=$2 [L]
RewriteRule ^scut-motor-metalic-(.*)-(.*)\.html$ index.php?ViewCat&CatID=$2 [L]
RewriteRule ^foto-(.*)-(.*).jpg$ includes/timthumb.php?src=data/$1/$2.jpg&w=300&q=100 [L]
RewriteRule ^product-(.*)-(.*).jpg$ includes/timthumb.php?src=data/$1/$2.jpg&w=530&q=100 [L]
RewriteRule ^side-(.*)-(.*).jpg$ includes/timthumb.php?src=data/$1/$2.jpg&w=175&h=110&q=100 [L]
RewriteRule ^zoom-(.*)-(.*).jpg$ data/$1/$2.jpg [L]
RewriteCond %{REQUEST_URI} ^/index.php$
RewriteCond %{QUERY_STRING} !^$
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^.*$ http://www.mysite.com/%1/? [R=302,L]
RewriteRule Despre index.php?Despre [L]
RewriteRule Help index.php?Help [L]
RewriteRule Livrare index.php?Livrare [L]
RewriteRule Contact index.php?Contact [L]
RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteRule ^(.*)$ "http\:\/\/www\.mysite\.com\/$1" [R=301,L]
ErrorDocument 404 /404.html