Fixing mod_rewrite and .htaccess on GoDaddy Hosting

1

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:

# 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:


#Fix Rewrite
Options –Multiviews

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


[credit: davidwalsh.name]

Labels:
Loading related posts...

1 comments:

April 8, 2022 at 3:40 AM Unknown said...

Borgata Hotel Casino & Spa - JTR Hub
Located in Atlantic casino-roll.com City, Borgata Hotel titanium ring Casino & Spa offers the finest poormansguidetocasinogambling.com in amenities and entertainment. It also provides a 출장안마 seasonal outdoor casinosites.one swimming


Post a Comment

2010 WEBSITE20. All rights reserved.