cakephp 网站域名更改,出现 301 问题
我将 cakephp 网站从子域移至另一个域。我在 htaccess 文件中处理了永久重定向,但在重定向中我失去了整洁/干净的 url 处理。
旧网站
iphone.gameachievements.org
新网站
gameachievements.org
当前重定向示例
iphone.gameachievements.org/games/jungle-swing -> gameachievements.org/index.php?url=games/jungle-swing
我想要的是
iphone.gameachievements.org/games/jungle-swing -> gameachievements.org/games/jungle-swing
这是我的 htaccess 文件的样子...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
RewriteCond %{HTTP_HOST} iphone.gameachievements.org
RewriteRule (.*) http://gameachievements.org/$1 [R=301,L]
</IfModule>
任何帮助都适用 谢谢
我!
I moved my cakephp site from a subdomain over to a different domain. I handled the permanent redirect in my htaccess file but in the redirect i am losing my neat/clean url handling.
old site
iphone.gameachievements.org
new site
gameachievements.org
example of current redirect
iphone.gameachievements.org/games/jungle-swing ->
gameachievements.org/index.php?url=games/jungle-swing
what i want.. is
iphone.gameachievements.org/games/jungle-swing ->
gameachievements.org/games/jungle-swing
here is what my htaccess file looks like...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
RewriteCond %{HTTP_HOST} iphone.gameachievements.org
RewriteRule (.*) http://gameachievements.org/$1 [R=301,L]
</IfModule>
any help is appricated
thanks
m!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
先把这个:
Put this first: