Tech ? - How to "force" the www. in address bar in frontpage

9 replies
Hello all,

I know I've done it. I've used it. I've remember learning it - I think. But for the life of me, I can't seem to remeber what I need to do to get the "www." to show up in the address bar for a site.

Cpanel, the frontpage software itself (page properties?)...any thoughts?

Thank you!
#address #bar #force #frontpage #tech #www
  • Profile picture of the author Jason_V
    To perform a redirect from domain.com to www.domain.com, insert the following code into your htaccess file.
    # mod_rewrite in use
    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{http_host} ^domain.com [NC]
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,

    courtesy:

    .htaccess Mod-Rewrite for WWW Domain Name Prefix | NeoHide
    Signature
    "When you do something exactly wrong, you always turn up something."
    -Andy Warhol
    {{ DiscussionBoard.errors[1257976].message }}
    • Profile picture of the author Steven Fullman
      Originally Posted by Jason_V View Post

      To perform a redirect from domain.com to www.domain.com, insert the following code into your htaccess file.
      # mod_rewrite in use
      Options +FollowSymlinks
      RewriteEngine On
      RewriteCond %{http_host} ^domain.com [NC]
      RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,

      courtesy:

      .htaccess Mod-Rewrite for WWW Domain Name Prefix | NeoHide
      Jason, there's a wee bit missing at the end...

      # mod_rewrite in use
      Options +FollowSymlinks
      RewriteEngine On
      RewriteCond %{http_host} ^domain.com [NC]
      RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

      That'll be the cause of your errors, Nathan...

      Steve
      Signature

      Not promoting right now

      {{ DiscussionBoard.errors[1265648].message }}
  • Profile picture of the author TristanPerry
    You can't do this via Frontpage since Frontpage is a WYSIWYG website editor.

    You need to edit your .htaccess file, as outlined above.
    Signature
    Plagiarism Guard - Protect Against Content Theft
    {{ DiscussionBoard.errors[1257988].message }}
  • Profile picture of the author Nathan Alexander
    Thanks folks. Bummer - it seems foreign to me, but that's fine, I've got a little time to figure it out and try it out.
    {{ DiscussionBoard.errors[1258002].message }}
    • Profile picture of the author ASM Marketing
      Hi Nathan,

      It's not as hard as it may sound, here's how:

      1. Open Notepad on your PC.
      2. Copy and paste the code that Jason provided into the document.
      3. Click 'File' and then 'Save As...'
      4. Name the file '.htaccess' and select file types to 'All Files'.
      5. Save the file to your desktop, or local website folder.
      6. Open your FTP and connect to your website.
      7. Upload the .htaccess file into the root directory (the first directory you will come across most likely).
      8. Done!
      Now all that's left is for you to have a PC and not a Mac! :p

      Alex
      {{ DiscussionBoard.errors[1258026].message }}
      • Profile picture of the author imacamper
        The only other issue you might run into is that Windows uses a different line feed character than Linux/Unix OSs. I won't bore you with the details.

        So if you use notepad and have problems, try creating your .htaccess file with the free tool gvim. It's a *nix tool that has been ported to windows. Just search for it and you'll find it.

        Cheers,

        Drew
        {{ DiscussionBoard.errors[1258050].message }}
  • Profile picture of the author Nathan Alexander
    Hey guys thanks for the help. I'm getting it, but it's still coming up errors. I don't have time to tinker around as my one year old just woke up...but thank you for all your help.

    Arghh, a few more minutes and I'd get it I keep getting Internal Service Error or some such so I have to keep undoing it.
    {{ DiscussionBoard.errors[1265235].message }}
  • Profile picture of the author Marcel Hartmann
    If you have Wordpress installed, some htaccess commands will clash with the Wordpress virtual htaccess file, including URL rewrites. WP makes it really easy to specify the www or non-www version of a site.

    Drupal has the code for the www/non-www included (you just need to un-comment from the default htaccess file it provides), and other CMSs do as well.

    When I had a static site, I just picked out the htaccess file from the Drupal CMS download, took out the Drupal-specific stuff and left in the part about rewriting the URL with www all the time. Uploaded it to the directory for the add-on domain and voila.
    {{ DiscussionBoard.errors[1265774].message }}
  • Profile picture of the author Dave Holmes
    bloody brilliant... Ive been trying to sort this one out but have had trouble working it out. Thanks so much to all you warriors problem is now solved.
    {{ DiscussionBoard.errors[1265795].message }}

Trending Topics