I am trying to rewrite mysite.com/broadcasts to mysite.com/feed so that it will show up in the location bar as “broadcasts” but actually go to /feed.
Here is what I have in the .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^broadcasts(/)?$ /feed/
</IfModule>
But this isn’t working… I get a 404 error.
Wondering if I’m doing something stupidly wrong.
Thanks!
Here’s how you do it:
This will make sure no matter what domain you use, it will always be matched if you have the right combination, making it easier if in the future you decide to change domains for example.
UPDATE
I accidentally used (.*) twice on my example, but it has been fixed
Hope this helps you