I wonder if my rewrite rules are incorrect since they are not working on my Godaddy shared server?
I have four very basic .htaccess URL rewrite rules. Whenever the user types/clicks on the link:
Beautiful SEO (desired) link
http://www.electriccarlos.com/albums/
is actuallyhttp://www.electriccarlos.com/type/audio/
Beautiful SEO (desired) link
http://www.electriccarlos.com/discography/
is actuallyhttp://www.electriccarlos.com/type/audio/
Beautiful SEO (desired) link
http://www.electriccarlos.com/gallery/
is actuallyhttp://www.electriccarlos.com/type/gallery/
Beautiful SEO (desired) link
http://www.electriccarlos.com/videos/
is actuallyhttp://www.electriccarlos.com/type/video/
.htaccess file:
# BEGIN Omar Juvera
RewriteEngine On
# albums
RewriteRule ^albums/?$ type/audio/ [NC,L]
RewriteRule ^discography/?$ type/audio/ [NC,L]
# gallery
RewriteRule ^gallery/?$ type/gallery/ [NC,L]
# videos
RewriteRule ^videos/?$ type/video/ [NC,L]
# END Omar Juvera
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
The .htaccess
file is properly configured and RedirectMatch
is active.
Well, anything that you do in your top rules is simply being overwritten by the WordPress:
RewriteRule . /index.php [L]
Which rewrites everything to
/index.php
except for existing files and directories.You're going to have to speak very nicely to WordPress and ask it to do this for you! If you don't know how to do that I suggest starting another question about how to do this with WordPress.