我正在使用此代码删除opencart的index.php。但是,还有其他地址:
/ index.php?route =帐户/注册
当然,代码开始在各处删除index.php。我的目标是由于内容重复而将其(index.php)删除以进行SEO。
我使用这个
Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ https://website.com/$1 [R=301,L]
要使用SEO URL,必须安装apache模块mod-rewrite,并且需要将htaccess.txt
重命名为.htaccess
。
然后在Opencart的管理员内部转到System > Settings > Edit Store > Settings > Server > Use SEO URLs > YES
。
不,不起作用:X,我只需要index.php ...当我进行此更改时,它只是开始切出其他地址。我只想隐藏index.php :)当有人加载确切的index.php之后没有其他变量时,请对该域进行引用。