Trying to figure out mod_rewrite is driving me insane. What do I put in my .htaccess file if I want to redirect my-domain.com/facebook (case-insensitive) to my facebook page at http://www.facebook.com/pages/blah
Thanks,
Paul
Trying to figure out mod_rewrite is driving me insane. What do I put in my .htaccess file if I want to redirect my-domain.com/facebook (case-insensitive) to my facebook page at http://www.facebook.com/pages/blah
Thanks,
Paul
I wouldn't bother with mod_rewrite, I would simply create a simple redirect with the following line:
Redirect 301 /facebook http://www.facebook.com/pages/blah
However, it should be noted that Apache treats all URLs as case sensitive.
The best way to learn anything, is to question everything.
WigeDev - Freelance web and software development
Create a directory in your FTP and call it facebook.
Assuming you use cPanel, log in and under "Domains" click on "Redirects".
Here you can set up a redirect so that my-domain.com/facebook routes directly to your personal Facebook page.
I hope this helps.
P.S If you don't use cPanel you can use a manual HTML redirect in an index page within the /facebook directory. If you don't use cPanel let me know, and I'll explain this method.
Thanks for the replies. Because file and directory names are case-sensitive I thought mod_rewrite would be a better option because that can be done case-insensitively.