問題が発生しています。私はこのURLを取得しようとしています:
mySite.com/index.php?url=category/value1/value2/value3
これから:
MySite.com/category/value1/value2/value3
私はこの .htaccess ファイルを持っています:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
</IfModule>
カテゴリが「インデックス」以外のすべての場合、すべてが正常に機能するため、URL を入力すると:
MySite.com/content/tv/color
配列 $_GET は次のようになります。
Array
(
[url] => content/tv/color/
)
しかし、私が置くとき:
MySite.com/index/option1/option2
配列が空です
Array()
apache.conf ファイルを確認しましたが、問題が見つかりません。
<VirtualHost *:80>
ServerAdmin user@site.com
DocumentRoot /home/htdocs
<Directory />
AllowOverride all
</Directory>
<Directory /home/htdocs>
#>>>>>HERE I HAVE MY TEST APP <<<<<<<<
DirectoryIndex index.html index.php
Options FollowSymLinks MultiViews
RewriteEngine ON
AllowOverride all
Order allow,deny
allow from all
</Directory>
Alias /simplesaml /var/simplesamlphp/www
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>