我正在使用 codeigniter 框架重新开发一个网站。
当我们上线时,我们希望确保一些旧 URL 将被重定向到新站点上的相应页面。
因此,我将我认为正确的规则放入现有的 htaccess 文件中,置于 CodeIgniter 应用的其他规则之上。
但是,它们没有受到影响。谁能建议我在这里缺少什么?
# pickup links pointing to the old site structure
RewriteRule ^(faq|contact)\.php$ /info/ [R=301]
RewriteRule ^registration\.php$ /register/ [R=301]
RewriteRule ^update_details\.php$ /change/ [R=301]
# Removes access to the system folder by users.
RewriteCond %{REQUEST_URI} ^_system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
# This snippet prevents user access to the application folder
# Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^myapp.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
# This snippet re-routes everything through index.php, unless
# it's being sent to resources
RewriteCond $1 !^(index\.php|resources)
RewriteRule ^(.*)$ index.php/$1