Long url in iWeb...How can I shorten to just www.mynamehere.com?

Discussion in 'Web Design and Development' started by BobbyDrake, Aug 30, 2009.

  1. BobbyDrake macrumors newbie

    Aug 30, 2009
  2. JFreak macrumors 68040


    Jul 11, 2003
    Tampere, Finland
    First of all, the first page you navigate should be named "index.html", this way browsers pick it up from the folder in case you do not mention a direct page name. Change it first and it becomes:


    Then loose the "BobbyDrake" folder altogether and copy files to the root of your web server. Therefore your index.html page would be in the folder accessible via www.bobbydrake.com web address.

    That's the principle.

    Now how iWeb handles folders, I do not know. If you have a project called BobbyDrake it might create such a folder automatically and there might be no way of getting rid of it. But it might not be a problem as there should be a preference somewhere that you could specify "this project will be published into www.bobbydrake.com address" so iWeb should adjust links accordingly.

    Now that you know what you're trying to do, you should have better luck fighting with iWeb I believe :)
  3. SrWebDeveloper macrumors 68000


    Dec 7, 2007
    Alexandria, VA, USA

    If iWeb forces those folder names on you, and you use a third party webhost such as godaddy.com (not Apple's web server) then the easiest thing to do is create a file called index.html and put it in the document root (top folder where you upload web stuff). In that file add in a meta tag in the head area such as:

    <meta http-equiv="refresh" content="2;url=http://www.bobbydrake.com/BobbyDrake/BobbyDrake.com.html">
    Along with the usual text/link "if your browser doesn't redirect within 2 seconds please click here".

    Option 2: PHP 301 redirect (create file named index.php) if your webhost supports PHP of course:

    "HTTP/1.1 301 Moved Permanently" ); 
    Header"Location: http://www.bobbydrake.com/BobbyDrake/BobbyDrake.com.html" ); 
    Option 3: Apache .htaccess 301 redirect (if your webhost supports Apache and mod_rewrite is enabled and a .htaccess file is permitted, if so create the file on your document root and edit as follows):

    # Only add 1st line below if that option is NOT globally enabled in your httpd.conf
    Options +FollowSymLinks 
    RewriteCond %{REQUEST_URI} !(\.) 
    RewriteRule .* http://www.bobbydrake.com/BobbyDrake/BobbyDrake.com.html [R=301,L]
    Notes: The 301 redirect is SEO compatible, used in all examples.

    I am sure there are other ways, I just am listing a few common solutions, by no means the only ones. Option 3 is the fastest of those listed above, it redirects to your home page if the URI does not contain a period --- not sure if I got it or the logic right as I wrote this quickly, but a good place to start.

  4. angelwatt Moderator emeritus


    Aug 16, 2005
    Looks like you did a publish to folder option. Take the contents of the BobbyDrake folder and upload that rather than uploading the entire BobbyDrake folder itself. This will shorten it some.

    iWeb automatically creates an index.html file that will point to your home page for you so people should be able to enter just your domain name in order to get to your site, if you do the above step.

Share This Page