私はこの質問が何度も尋ねられていると推測していますが、おそらく私が必要とするものを私に与えることができませんでした。.htaccess RewriteRule trouble
..だから私は、次のURLでスクリプトにアクセスすることができます
http://website.com/index.php/hello/world
http://website.com/hello/world
はどちらも(この例では、ハロー/世界)入力を解析しindex.phpのに行きます。しかし
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?path=$1&%{QUERY_STRING} [L]
</IfModule>
:
これは私のの.htaccessです。 ?サイトはこのようにアクセスされた場合:
http://website.com/index.php/hello/world
のRewriteRule出力のindex.phpと似たようなパス= index.phpを/ハロー/世界
私はそのインデックスを削除したいです。 PHPパス= のRewriteRuleで
私はあなたがPHPスクリプトを変換すると思います。 –
@GabrielSantosの問題はありませんhat $ _GET [path]は、/index.php/hello/worldを使用すると存在しません。 –
どういうわけか、私のことと非常に似た質問があります.. http://stackoverflow.com/questions/5123971/apache-htaccess -cut-a-string-from-url-and-redirect –