0
我想以两种不同的方式处理图像URL。 首先,当浏览器要求: http://example.com/image.jpg(需要被示出)通过传递变量处理图像URL(.htaccess)
其次,当浏览器要求: http://example.org/image.jpg?actionId=123(需要是URL重写到index.php actionId = 123?)
重点是,当URL有指定的变量时,我们需要将该变量重定向到index.php,并且它的值。
我使用的.htaccess mod_rewrite的使用,这是现在以下几点:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [QSA]
</IfModule>
所以它是现有的文件或目录,任何其他方式的检查,它是通过在“Q”参数去的index.php 。
预先感谢您!