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.

Can I delete .htaccess?

Discussion in 'Apache' started by bschneider5, Oct 19, 2005.

Thread Status:
Not open for further replies.
  1. #1
    I recenlty installed most of a MOD for phpbb forms for SEO optimization. Part of the mod was to add some code to the htaccess file. However, I found(on my server) about 6 or 7 different ones, in different directories. I am thinking that this is frontpage generated? Well, I switched from frontpage over to dreamweaver MX. I am afraid to delete anything like this. I guess my question is, can I delete them all and just make a new one?
     
    bschneider5, Oct 19, 2005 IP
  2. JoeO

    JoeO Peon

    Messages:
    431
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What text is in the .htaccess files now?
     
    JoeO, Oct 19, 2005 IP
  3. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #3
    the htaccess of each folder will over-ride the parent ones, so be careful if you delete them
     
    fryman, Oct 19, 2005 IP
  4. Crazy_Rob

    Crazy_Rob I seen't it!

    Messages:
    13,157
    Likes Received:
    1,366
    Best Answers:
    0
    Trophy Points:
    360
    #4
    .htaccess are for directory directives. So it's not uncommon for each directory to have it's own .htaccess.
     
    Crazy_Rob, Oct 19, 2005 IP
  5. bschneider5

    bschneider5 Active Member

    Messages:
    1,009
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    88
    #5
    This is the contents of one of them(in htdocs dir) and includes my rewrite code:
    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName stampingallery.com
    AuthUserFile /www/s/t/stampingallery.com/htdocs/_vti_pvt/service.pwd
    AuthGroupFile /www/s/t/stampingallery.com/htdocs/_vti_pvt/service.grp

    RewriteEngine On
    RewriteRule ^forums.* index.php [L,NC]
    RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
    RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
    RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
    RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
    RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
    RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
    RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
    RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
    RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
    RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
    RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
    RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
    RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
    RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
    RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
    RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
    RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]
     
    bschneider5, Oct 19, 2005 IP
  6. Crazy_Rob

    Crazy_Rob I seen't it!

    Messages:
    13,157
    Likes Received:
    1,366
    Best Answers:
    0
    Trophy Points:
    360
    #6
    Do not delete that!
     
    Crazy_Rob, Oct 19, 2005 IP
  7. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #7
    That phpBB code (rewrite engine on) goes into your forum root file's htaccess
     
    mdvaldosta, Oct 19, 2005 IP
  8. bschneider5

    bschneider5 Active Member

    Messages:
    1,009
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    88
    #8
    Will this piece cause me problems? What will happen if I remove it?

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
     
    bschneider5, Oct 19, 2005 IP
  9. JoeO

    JoeO Peon

    Messages:
    431
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It will just cause those file types to be listed in your file directory list. Where as now they are not.
     
    JoeO, Oct 19, 2005 IP
  10. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #10
    dunno, but as long as everything was working fine before don't mess with it unles you know for sure. adding the rewrite shouldn't affect anything else.
     
    mdvaldosta, Oct 19, 2005 IP
  11. bschneider5

    bschneider5 Active Member

    Messages:
    1,009
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    88
    #11
    yeah, becasue the prolem I'm having is that the rewrite doesn't seem to be working. I have made a new htaccess file just for my forum directory. Do I need to add anything besides this?

    RewriteEngine On
    RewriteRule ^forums.* index.php [L,NC]
    RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
    RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
    RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
    RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
    RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
    RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
    RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
    RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
    RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
    RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
    RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
    RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
    RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
    RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
    RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
    RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
    RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]
     
    bschneider5, Oct 19, 2005 IP
  12. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #12
    It's in your forum root right?
     
    mdvaldosta, Oct 19, 2005 IP
  13. bschneider5

    bschneider5 Active Member

    Messages:
    1,009
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    88
    #13
    bschneider5, Oct 19, 2005 IP
  14. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #14
    maybe your server doesnt allow mod rewrite? theirs a pretty easy way to check, but I don't remember how.
     
    mdvaldosta, Oct 19, 2005 IP
  15. bschneider5

    bschneider5 Active Member

    Messages:
    1,009
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    88
    #15
    Well, I looked around on my servers site (POWWEB) and seems as though they are permitted.
     
    bschneider5, Oct 19, 2005 IP
  16. romanclavijo

    romanclavijo Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Hi all, this is my htaccess file:

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>




    But the site says "Forbidden
    You don't have permission to access / on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. "

    What is the solution for this? I dont have to much experiencie with Apache and php, please mail me at cm@talegux.com

    Thank :confused: you a lot!
     
    romanclavijo, May 3, 2007 IP
  17. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #17
    Delete the file and see if it works.
    I smell a 'ban every one!!'
     
    Nintendo, May 3, 2007 IP
Thread Status:
Not open for further replies.