Help with .htaccess file please

Discussion in 'Apache' started by jambo2, Apr 24, 2009.

  1. #1
    Hi DPers

    I have bought a number of sites in a job lot here on DP.

    The sites were working fine pre-sale and the seller provided a zip of the files which I installed on my server. They are all based on the same template.

    An example is animationdesign.info.

    The config file has been altered to add my aff codes and I added G Analytics and Webmaster Tools to the template. Anything other than the homepage results in a 404.

    I have also tried re-uploading the original files from the seller but the same problem occurs. :confused:

    I originally thought it was a php issue and posted in the php forums but was pointed to the .htaccess file. I'm a novice so any advice is welcomed!

    The site is hosted with 1and1 on a shared server.

    The current contents of the .htaccess file is:

    RewriteEngine on
    RewriteRule ^(.*)\.html$ index.php?pg=$1 [nc]
    RewriteRule ^sitemap.xml$ sitemap.php [L]
    RewriteRule ^rssfeed.xml$ rssfeed.php [L]

    Thanking you in advance :)
     
    jambo2, Apr 24, 2009 IP
  2. sandeeppai

    sandeeppai Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please rename .htaccess file and see whether it is an issue with .htaccess or not.
     
    sandeeppai, Apr 25, 2009 IP
  3. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #3
    1.
    as said above
    did u do that test w/o your htaccess ?

    2.
    did u physically check the existence of all your file on the server ?

    3.
    are all files flat files or are you using a mysql dbase ?
     
    hans, Apr 25, 2009 IP
  4. jambo2

    jambo2 Member

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    Hi

    Thanks for the replies.

    1, I have tried removing the existing .htaccess file and get the same 404 errors.

    2, The files are all there as far as I can tell.

    3, The files are dynamically generated by php through a template, so neither I think.

    As am a noob, esp with php any advice/tips is welcomed.

    Cheers,
    jambo2
     
    jambo2, Apr 27, 2009 IP
  5. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #5
    when files are dynamically created
    then usually by use of a MySQL db that stores the text
    unless YOU have created another method to store the text modules dynamically inserted into template

    how do you KNOW for absolutely sure that the files are THERE ??
    do you personally and physically SEE the files ??

    if NO flat files - then MySQL db - then question did you create/upload the db with the texts ?
     
    hans, Apr 27, 2009 IP