htaccess???

Discussion in 'Web Hosting' started by tomcruisesky, Apr 20, 2010.

  1. tomcruisesky

    tomcruisesky
    uix_expand uix_collapse
    New Member

    Joined:
    Mar 23, 2010
    Messages:
    7
    Likes Received:
    0
    G'day,

    On most of my Etomite based sites I have a .htaccess file with variations of the following in it:

    RewriteEngine On
    # RewriteBase /~jscubado/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]



    However, this doesn't solve a problem I'm having.

    To improve my search engine rankings, I'd like everyone to be treated as if they came to my web site using a URL including www. That is, I don't want to be seen as splitting my page rank across two domains.

    I want it so as if people put in the URL, scubadoctor.com.au/service.htm, they will get the URL scubadoct....au/service.htm

    Can anyone help me to create a .htaccess file that achieves this?

    Best Regards
     
  2. Fergal

    Fergal
    uix_expand uix_collapse
    Premium Member
    Premium Member

    Joined:
    Nov 18, 2007
    Messages:
    10,575
    Likes Received:
    1,165
    Hi tomcruisesky, this article should give you all the information you need.

    Please post back to let us know if it has worked out for you.
     
  3. tomcruisesky

    tomcruisesky
    uix_expand uix_collapse
    New Member

    Joined:
    Mar 23, 2010
    Messages:
    7
    Likes Received:
    0
    thanks a lot for sharing...
     
  4. lukepedru

    lukepedru
    uix_expand uix_collapse
    New Member

    Joined:
    Apr 8, 2010
    Messages:
    11
    Likes Received:
    0
    .htaccess is the default name of a directory-level configuration file that allows for decentralized management of web server configuration. The .htaccess file is placed inside the web tree, and is able to override a subset of the server's global configuration; the extent of this subset is defined by the web server administrator.[1] The original purpose of .htaccess was to allow per-directory access control (e.g. requiring a password to access the content), hence the name. Nowadays .htaccess can override many other configuration settings, mostly related to content control, e.g. content type and character set, CGI handlers, etc.

    How to use them
    .htaccess files provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.
    Note: If you want to call your .htaccess file something else, you can change the name of the file using the AccessFileName directive.
    For example, if you would rather call the file .config then you can put the following in your server configuration file:
    AccessFileName .config

    What you can put in these files is determined by the AllowOverride directive. This directive specifies, in categories, what directives will be honored if they are found in a .htaccess file. If a directive is permitted in a.htaccess file, the documentation for that directive will contain an Override section, specifying what value must be in AllowOverride in order for that directive to be permitted.

    For example, if you look at the documentation for the AddDefaultCharset directive, you will find that it is permitted in .htaccess files. (See the Context line in the directive summary.) The Override line reads "FileInfo". Thus, you must have at least "AllowOverride FileInfo" in order for this directive to be honored in .htaccess files.

    Example:
    Context: server config, virtual host, directory, .htaccess
    Override: FileInfo

    If you are unsure whether a particular directive is permitted in a .htaccess file
     

Share This Page