尝试向每个链接添加尾部斜杠.即http://mysite.com/products应该将301重定向到http://mysite.com/products/等.但是如何?这是htaccess:
RewriteEngine on
DirectoryIndex index.php
Options -Indexes
RewriteBase /
RewriteCond %{REQUEST_URI} \.css$
RewriteCond %{QUERY_STRING} ^pack$
RewriteRule ^(.*)$ /modules/system/css_compactor.php?filename=$1 [L]
RewriteCond %{REQUEST_URI} \.js$
RewriteCond %{QUERY_STRING} ^pack$
RewriteRule ^(.*)$ /modules/system/js_compactor.php?filename=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php
RewriteRule /admin/(.*)$ /admin/index.php
Run Code Online (Sandbox Code Playgroud)
需要帮忙!
怎么做.例如,我们有一个数组:
array(
0 => 'Regular 1 000',
1 => 'Regular 500',
2 => 'Regular 2 000',
3 => 'Big',
4 => 'Regular 1 000 000',
5 => 'Regular 50 000'
)
Run Code Online (Sandbox Code Playgroud)
我需要按顺序放置它们:
array(
3 => 'Big',
1 => 'Regular 500',
0 => 'Regular 1 000',
2 => 'Regular 2 000',
5 => 'Regular 50 000',
4 => 'Regular 1 000 000'
)
Run Code Online (Sandbox Code Playgroud)
我需要维护索引关联.看来我需要使用uasort.任何人都可以向我建议一个用于callable ( $cmp_function )价值的功能 吗?