Urgent Need Help with .htaccess file

Discussion in 'Site & Server Administration' started by FreeFun4Every1, Jun 11, 2010.

  1. #1
    i had buy hosting in bluehost with primary domain wallpapers4ever.com
    now when i add new addon domain krishnawebsolution.info the new directory is also created in public_html/krishnawebsolution but when i am uploading files in that the files are uploaded successfull but site is not working it gives 500 Internal server error
    the .htaccess file in my directory public_html will causes an error i cannot remove it because it is the part of my wallpaper site script
    if i disable it by renaming .htaccess to .htaccess.old so my new domain work properly but i cannot do it permanent.
    the Helpdesk of bluehost told me you have to edit the code of your .htaccess file
    but i don't know which code to edit?
    i am also attaching my .htaccess file as text file
    can any one give me edited code?
    thank you
     
    Solved! View solution.
    FreeFun4Every1, Jun 11, 2010 IP
  2. inoxhost

    inoxhost Peon

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just enable .htaccess file and check error logs. It will show you what directive is not working properly, in this way you could be able to find out exact issue.
     
    inoxhost, Jun 11, 2010 IP
  3. FreeFun4Every1

    FreeFun4Every1 Prominent Member

    Messages:
    1,109
    Likes Received:
    234
    Best Answers:
    9
    Trophy Points:
    365
    #3
    i got some this type of error
    "Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace."

    Bluehost error log is too complicated it shows too many errors
    there are 2 error log
    MAIN error_log and PHP error_log
    this error is from Main error log and Main error log shows all error of server so it shows error of other sites which is not mine.
     
    FreeFun4Every1, Jun 12, 2010 IP
  4. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #4
    It's probably the .htaccess in public_html interacting with the rules in the .htaccess for the this site.

    Me, I'd delete the addon domain, then add it again but when it asks the path remove the public_html/ part so it's just krishnawebsolution.info, now when you add the domain its files will be stored in the folder krishnawebsolution.info which is outside of public_html and so now you shouldn't have any issues.
     
    tolra, Jun 12, 2010 IP
  5. FreeFun4Every1

    FreeFun4Every1 Prominent Member

    Messages:
    1,109
    Likes Received:
    234
    Best Answers:
    9
    Trophy Points:
    365
    #5
    Tolra thanx for your help but you are using another hosting i am using bluehost and it gives only 2 options
    1) "Create a new directory" in that "public_html/" path is fixed then you can give any directory name and
    2) "Use an existing directory" so it will show only folder which are in in public_html folder.
    now tell me what to do...
    i have only one option that i have to edit .htaccess file and i don't know littelbit coding of that file.
     
    FreeFun4Every1, Jun 12, 2010 IP
  6. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #6
    Yes, we run cPanel on all our hosting servers and it allows you to do what I described.

    Well if you can't move the location then first just check I'm correct, put the .htaccess back for krishnawebsolution.info and rename the .htaccess for wallpapers4ever.com

    Assuming krishnawebsolution.info now works then you need to give us both .htaccess files so we can see what's what and maybe figure out a fix, that or swap to a cPanel based host :)
     
    tolra, Jun 12, 2010 IP
  7. FreeFun4Every1

    FreeFun4Every1 Prominent Member

    Messages:
    1,109
    Likes Received:
    234
    Best Answers:
    9
    Trophy Points:
    365
    #7
    it is not like that you are telling therefore here i am showing you a caps what happened when i add new domain.
    [​IMG]

    and there is no .htaccess file for krishnawebsolution i have only one .htaccessfile of my main website wallpapers4ever.com which come with script and which is in public_html folder
    so i have only one .htaccess file which i had already attach in 1st post.
    and here i am showing my file manager view of both public_html folder and krishnawebsolution folder
    [​IMG]
    [​IMG]
     
    FreeFun4Every1, Jun 12, 2010 IP
  8. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #8
    Ah, ok, sorry I misunderstood exactly what you had.

    If you try http://krishnawebsolution.info/default.html then you'll see it loads the default.html file, so if you upload an index.html or index.php then when you go to http://krishnawebsolution.info/ it should work without the error.

    What looks to be happening is the .htaccess is saying if a file doesn't exists the send the request to index.php, in the case of http://krishnawebsolution.info/ it looks like the server doesn't accept default.html as the default page, hence the issue.
     
    tolra, Jun 13, 2010 IP
  9. FreeFun4Every1

    FreeFun4Every1 Prominent Member

    Messages:
    1,109
    Likes Received:
    234
    Best Answers:
    9
    Trophy Points:
    365
    #9
    FreeFun4Every1, Jun 13, 2010 IP
  10. #10
    In your .htaccess try changing the last 2 lines to be:
    
    RewriteCond %{HTTP_HOST} ^(www\.)?wallpapers4ever\.com
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?%{QUERY_STRING}&resource=$1 [L]
    
    Code (markup):
    I've not had a chance to try it, but the idea is the rule only runs for the wallpapers domain.
     
    tolra, Jun 13, 2010 IP
    FreeFun4Every1 likes this.
  11. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #11
    Try a thing here, create a blank .htaccess file under the add-on domain domain i.e. public_html/krishnawebsolution/.htaccess and see if it helps.
     
    madaboutlinux, Jun 14, 2010 IP
  12. FreeFun4Every1

    FreeFun4Every1 Prominent Member

    Messages:
    1,109
    Likes Received:
    234
    Best Answers:
    9
    Trophy Points:
    365
    #12
    Thank you very much tolra it's 100% working code i am very thankful 2 you...


    sorry madaboutlinux your trick is not woking
     
    Last edited: Jun 16, 2010
    FreeFun4Every1, Jun 16, 2010 IP
  13. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #13
    Glad we got there in the end :)
     
    tolra, Jun 16, 2010 IP