私は素晴らしい動作をするphpを持っていますが、変数を表示することからdirsのように見えるように変更したいと思います
例えば:
example.com/?mode=page&page=15
にexample.com/page/15
と
example.com/?mode=pic&picid=136
にexample.com/pic/136
しかし、私はそれを行うための1つの方法しか知りません。
RewriteRule ^(.*)$ index.php?mode=$1&page [R]
しかし、それは1つのケースでのみ機能し、それ以外の場合は404s
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
パス全体が通過するように使ってみました。ただし、この方法では、私のページでCSSが渡されないようです。
私は非常に混乱しています...
これが私のhtaccessファイルです
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase /
IndexIgnore *
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} !^css/styles\.css$
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]