1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

having problem with .htaccess

Discussion in 'Content Management' started by Scarface., Sep 8, 2006.

  1. #1
    hi,
    I m trying to SEO my site but everytime i do it, it gives me a 404 error. i know it has to do with the .htaccess what can i do?
     
    Scarface., Sep 8, 2006 IP
  2. mynewchoice

    mynewchoice Peon

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you be more specific on what you mean when you say you are trying to SEO your site? Are you making changes to your .htaccess and that results in the 404? If that is the case, what are you changing in the .htaccess?

    -mnc
     
    mynewchoice, Sep 8, 2006 IP
  3. Jetset

    Jetset Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Perhaps copy/paste your .htaccess here so we can take a look at it, and describe what exactly is it you are trying todo when you get the 404?
     
    Jetset, Sep 8, 2006 IP
  4. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Making SEO probably means playing with mod_rewrite so agree with above fellows.

    Your .htaccess coding will help finding the error.
     
    Pat Gael, Sep 8, 2006 IP
  5. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I cant copy it, the server wont let me, but to be more clear,

    I am using joomla for my poker site, and as you might know joomla has a SEO option in the configuration section of it, and also I have installed SEF404x, but for some reason i cannot run them because it takes me to an error page or a 404 not found page/
     
    Scarface., Sep 8, 2006 IP
  6. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    just found that my .htaccess is empty, what should i do?
     
    Scarface., Sep 9, 2006 IP
  7. mynewchoice

    mynewchoice Peon

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    That would depend on what you are trying to accomplish with the .htaccess file. Do you know what you are trying to do with this file?

    -mnc
     
    mynewchoice, Sep 9, 2006 IP
  8. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #8
    If Scarface is hosted on a server with Cpanel, this is a typical server behavior.

    After deleting .htaccess either by mistake or voluntarily, the server creates an empty .htaccess file.

    What should you do?
    read whatever commands you want to include for SEO, or just the basic 404 error instruction:

    
    ErrorDocument 404 /Your_Error_Document
    
    Code (markup):
     
    Pat Gael, Sep 10, 2006 IP
  9. KGL

    KGL Peon

    Messages:
    1,155
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #9
    If you are using 404SEF, make sure you add this to your .htaccess file:

    ##
    # @version $Id: readme.inc,v 1.3 2005/02/13 18:03:41 marlboroman_2k Exp $
    # @package Mambo_4.5
    # @copyright (C) 2000 - 2004 Miro International Pty Ltd
    # @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
    # Mambo is Free Software
    ##
    
    #
    #  mod_rewrite in use
    #
    DirectoryIndex index.php
    
    RewriteEngine On
    
    #  for apache on windows you might need to uncomment
    #  this Options line
    #Options +SymlinksIfOwnerMatch
    
    #  Uncomment following line if your webserver's URL
    #  is not directly related to physival file paths.
    #  Update YourMamboDirectory (just / for root)
    
    RewriteBase /
    #
    #  Rules
    #
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*) index.php
    Code (markup):
     
    KGL, Sep 10, 2006 IP
  10. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #10
    ^^ thank you. anything else i would need to add?
     
    Scarface., Sep 11, 2006 IP
  11. KGL

    KGL Peon

    Messages:
    1,155
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Nope, that should do it.
     
    KGL, Sep 11, 2006 IP
  12. KGL

    KGL Peon

    Messages:
    1,155
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #12
    This should be what your .htaccess file should look like:
    
    ##
    # @version $Id: htaccess.txt 4085 2006-06-21 16:03:54Z stingrey $
    # @package Joomla
    # @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
    # @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
    # Joomla! is Free Software
    ##
    
    
    #####################################################
    #  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
    #
    # The line just below this section: 'Options FollowSymLinks' may cause problems
    # with some server configurations.  It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file.  If using it causes your server to error out, comment it out (add # to 
    # beginning of line), reload your site in your browser and test your sef url's.  If they work,
    # it has been set by your server administrator and you do not need it set here. 
    #
    # Only use one of the two SEF sections that follow.  Lines that can be uncommented
    # (and thus used) have only one #.  Lines with two #'s should not be uncommented
    # In the section that you don't use, all lines should start with #
    #
    # For Standard SEF, use the standard SEF section.  You can comment out
    # all of the RewriteCond lines and reduce your server's load if you
    # don't have directories in your root named 'component' or 'content'
    #
    # If you are using a 3rd Party SEF or the Core SEF solution
    # uncomment all of the lines in the '3rd Party or Core SEF' section
    #
    #####################################################
    
    #####  SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
    # SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
    # OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
    #
    # In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
    # RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
    # May need to be uncommented.  If you are running your Joomla/Mambo from
    # a subdirectory the name of the subdirectory will need to be inserted into this
    # line.  For example, if your Joomla/Mambo is in a subdirectory called '/test/',
    # change this:
    # RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
    # to this:
    # RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
    #
    #####################################################
    
    
    ##  Can be commented out if causes errors, see notes above.
    # Options FollowSymLinks
    
    #
    #  mod_rewrite in use
    
    #RewriteEngine On
    
    
    #  Uncomment following line if your webserver's URL
    #  is not directly related to physical file paths.
    #  Update Your Joomla/MamboDirectory (just / for root)
    
    #RewriteBase /
    
    
    ########## Begin - Joomla! core SEF Section
    ############# Use this section if using ONLY Joomla! core SEF
    ## ALL (RewriteCond) lines in this section are only required if you actually
    ## have directories named 'content' or 'component' on your server
    ## If you do not have directories with these names, comment them out.
    #
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] 		##optional - see notes##
    #RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
    #RewriteRule ^(content/|component/) index.php
    #
    ########## End - Joomla! core SEF Section
    
    
    
    ########## Begin - 3rd Party SEF Section
    ############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
    #
    #RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] 		##optional - see notes##
    #RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule (.*) index.php
    #
    ########## End - 3rd Party SEF Section
    ##
    # @version $Id: readme.inc,v 1.3 2005/02/13 18:03:41 marlboroman_2k Exp $
    # @package Mambo_4.5
    # @copyright (C) 2000 - 2004 Miro International Pty Ltd
    # @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
    # Mambo is Free Software
    ##
    
    #
    #  mod_rewrite in use
    #
    DirectoryIndex index.php
    
    RewriteEngine On
    
    #  for apache on windows you might need to uncomment
    #  this Options line
    #Options +SymlinksIfOwnerMatch
    
    #  Uncomment following line if your webserver's URL
    #  is not directly related to physival file paths.
    #  Update YourMamboDirectory (just / for root)
    
    RewriteBase /
    #
    #  Rules
    #
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*) index.php
    Code (markup):
     
    KGL, Sep 11, 2006 IP
    Scarface. likes this.
  13. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #13
    ^^ can i just copy and paste that?
     
    Scarface., Sep 11, 2006 IP
  14. activeimedia

    activeimedia Well-Known Member

    Messages:
    920
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #14
    By the looks of it, yes you can.
     
    activeimedia, Sep 11, 2006 IP
  15. drno

    drno Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    There should be a file named htaccess.txt located in your Joomla! installation directory. That file is supposed to be renamed to .htaccess when you enable search engine friendly URLs in Joomla!
     
    drno, Sep 11, 2006 IP
  16. KGL

    KGL Peon

    Messages:
    1,155
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #16
    yesssssssssssiir.
     
    KGL, Sep 11, 2006 IP
  17. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #17
    sweet! thank you. i'll do that now.
     
    Scarface., Sep 11, 2006 IP
  18. KGL

    KGL Peon

    Messages:
    1,155
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #18
    post an update after you do.
     
    KGL, Sep 11, 2006 IP
  19. KGL

    KGL Peon

    Messages:
    1,155
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #19
    I see it worked, congrats, shoot me some green.
     
    KGL, Sep 11, 2006 IP
  20. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #20
    thx i did :p
     
    Scarface., Sep 12, 2006 IP