No matter what url somebody uses to access my site, I’d like it to redirect to www.MyUrl.com. Is this possible?
Leave a Reply
You must be logged in to post a comment.
No matter what url somebody uses to access my site, I’d like it to redirect to www.MyUrl.com. Is this possible?
You must be logged in to post a comment.
As far as i know there is no way to force the url to uppercase.
As for forcing the www. this can vary as to where you are hosting etc.
Here is one generic way of doing this using your .htaccess file.
Hi @FigBug:
1.) You can easily force “www” in your domain because WordPress handles it all for you. You’ll only need to set two defines in the
/wp-config.php
file is found in your website’s root; this is the same file where your database userid and password is stored.Add these two lines to your
/wp-config.php
file somewhere before therequire_once(ABSPATH . 'wp-settings.php');
line:2.) You cannot force domain capitalization. Domains are case-insensitive. Even if you try WordPress will lowercase it.
(So give it up, it ain’t happening! 🙂
There are lots of ways to force a redirect from a given URL to a preferred variant of that URL. Which one you use will depend upon how much control you have over your environment. Some include:
What you have to keep in mind is that domain names are NOT case-sensitive, and in this case the browser will control what gets displayed, not your server. More importantly, each redirection you force will (1) require additional work from your server, (2) increase the complexity of your configuration, and (3) delay your users from accessing your site. If your goal is to enhance your brand (MyUrl instead of myurl) you’d be better served by focusing on the design of your site.
There are two real reasons to implement site redirection to force a given domain: