1godaddy主机ram_在GoDaddy主机上修复mod_rewrite和.htaccess

1godaddy主机ram

I recently launched a new website on GoDaddy shared hosting. The website required mod_rewrite for SEO-friendly URLs. GoDaddy provides mod_rewrite but every time I tried to hit a two-deep URL, I would get a 404 error. Here's what I had:

我最近在GoDaddy共享主机上启动了一个新网站。 该网站需要mod_rewrite才能使用SEO友好的URL。 GoDaddy提供了mod_rewrite,但是每次我尝试访问两个深的URL时,都会收到404错误。 这是我所拥有的:

# Mod Rewrite
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

The fix to this problem was to add the following directive before my mod_rewrite directives:

解决此问题的方法是在我的mod_rewrite指令之前添加以下指令:

#Fix Rewrite
Options -Multiviews

Tada! The URLs began working and the website's SEO has taken off!

多田 URL开始起作用,并且网站的SEO起飞了!

翻译自: https://davidwalsh.name/mod_rewrite-htaccess-godaddy

1godaddy主机ram

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值