.htaccess Tutorial - Directives You Need to Know - #71

Поділитися
Вставка
  • Опубліковано 13 гру 2024

КОМЕНТАРІ • 60

  • @dmdennislive
    @dmdennislive 10 місяців тому +1

    Amazing video, thank you so much for it! You helped me fix my page redirects with it. 😊For anyone else who's looking for redirects from one page to another:
    Redirect from one page to another, same domain: 36:19
    Redirect from one page to another, different domain: 37:29

    • @DevDrawer
      @DevDrawer  10 місяців тому +1

      Thanks for watching. I am glad it helped you out.

  • @phillipsengineer
    @phillipsengineer 2 роки тому +3

    You make this so clear. About a year ago, I was looking for a .htaccess tutorial and found nothing that made sense to me. Thanks so much!!

  • @pinnaclewd
    @pinnaclewd Рік тому

    Thank you, I have been looking for something like this for a long long time. Top Man :-)

    • @DevDrawer
      @DevDrawer  Рік тому

      There is also a part 2 with a few more commands.

  • @teddymakeni
    @teddymakeni Рік тому

    Thanks Dev Drawer! I'll be joining this channel.

    • @DevDrawer
      @DevDrawer  Рік тому

      That is great to hear. Glad you could make it.

  • @xerox2552
    @xerox2552 7 місяців тому +1

    Excel master class about the htaccess file.

    • @DevDrawer
      @DevDrawer  7 місяців тому

      Thank you for watching. I am glad it made an impact.

  • @mikhailmcrae5924
    @mikhailmcrae5924 2 роки тому +1

    This was amazing. Been trying figure this out all week.

    • @DevDrawer
      @DevDrawer  2 роки тому +1

      Glad it helped! There is also another .htaccess video that goes into my advanced directives that may help you in the future: ua-cam.com/video/aU48yQHh9q4/v-deo.html
      This video and that one should cover most if not all of your .htaccess bases.

  • @mr_howto-everthing
    @mr_howto-everthing Рік тому

    Thanks bro, after struggling for 3 months🥰🥰

  • @tunarmemmedov196
    @tunarmemmedov196 10 місяців тому

    hey , in htaccess file i consistently get engine rewrite not allowed here error,what can cause it

  • @Niqnex
    @Niqnex 6 місяців тому

    Great work. Keep it up...

  • @sonoftroy8572
    @sonoftroy8572 3 роки тому +3

    Great content about htaccess, how’d you learn so much about htaccess? Is there a book we can read about it or web app with documentation?

    • @DevDrawer
      @DevDrawer  3 роки тому +5

      Hmmm, mostly what I added was from experience with projects. Mostly googling certain situations throughout my career.
      This may help in some cases. I just found it via search. I don't use it so I cannot tell you how much is there but it looks like it could cover a lot of situations: www.plesk.com/blog/various/comprehensive-guide-to-htaccess/

  • @gabrielolivares2331
    @gabrielolivares2331 2 роки тому +1

    This is really awesome tutorial. Great work man.

    • @DevDrawer
      @DevDrawer  2 роки тому

      Thanks a ton! I am glad you like it.

  • @rossgeography
    @rossgeography 2 роки тому +1

    The .htaccess directives / commands are quite gnarly - how / where do you learn the syntax?
    EDIT: at the end of the video you say you learned through a mixture of experience and google and indeed there are some decent articles - the Apache docs offer more info - but if ever a DSL? (Apache C) was ripe for a makeover with some more understandable JSON or similar config files it's these directives - there seems to be hundreds of them even though only

    • @DevDrawer
      @DevDrawer  2 роки тому +5

      This may be helpful for you: www.askapache.com/htaccess/
      When I was learning about it, there was not really a central place to learn all of what you can do. So it was mostly trial and error. I don't forsee it getting a makeover anytime soon since it is a very powerful way to modify your server as it is. I do agree a JSON style format would be helpful but once you learn more about it, it makes more sense. Also, I probably use less than 10% of what is available. I mainly stick to the rewrites and caching abilities.

    • @rossgeography
      @rossgeography 2 роки тому +1

      @@DevDrawer thanks v.much for taking the time to reply - will investigate link - thanks again for original video - Weekend well :)

  • @kristianworkinger2138
    @kristianworkinger2138 2 роки тому

    Quick question: In the RegEx, should your forward slash next to your whitespace be escaped?

    • @DevDrawer
      @DevDrawer  2 роки тому +1

      I responded to this a while ago, but yes you are absolutely correct about escaping the dots. Since I was on my local I could not test it but the dots in the domain should be escaped (\.) like the other places.

  • @cepi24
    @cepi24 2 роки тому

    Where is the video mentioned in the beginning? Thsnks

    • @DevDrawer
      @DevDrawer  2 роки тому

      The video you are looking for is here: ua-cam.com/video/ox8aeQ31PE0/v-deo.html

  • @benlee3545
    @benlee3545 2 роки тому

    May I know what programming language this hta is written in? Example order deny, allow.. what language is that? Hope someone can advise as I am totally new in this.

    • @DevDrawer
      @DevDrawer  2 роки тому +2

      It is written in Apache. Not really a programming language but more of explicit directives for an Apache / Linux server.

    • @benlee3545
      @benlee3545 2 роки тому

      @@DevDrawer alright. Thank you. Will try to find some tutorial for total newbie.

  • @realist8774
    @realist8774 3 роки тому

    At 15:33 you forget to escape the dots. And why did you switch the L and the R=301?

    • @DevDrawer
      @DevDrawer  3 роки тому +1

      I think it was just that way in the doc notes I wrote for the tutorial. In this case, it does not matter the placement of the L, as the 3xx processes automatically, in other instances, it should go last so it ends the loop.
      You are absolutely correct about escaping the dots. Since I was on my local I could not test it but the dots in the domain should be escaped (\.) like the other places.

  • @abdoben833
    @abdoben833 3 роки тому

    good explanation , all details I needed in one video.

    • @DevDrawer
      @DevDrawer  3 роки тому

      Glad it helped. .htaccess files can be tricky.

  • @josealejandrosanchez4180
    @josealejandrosanchez4180 2 роки тому

    bueno video, estaba buscando como funciona framework laravel con htaccess, gracias !

    • @DevDrawer
      @DevDrawer  2 роки тому

      Gracias por ver, me alegra que te haya gustado.

  • @liveinhouse
    @liveinhouse 3 роки тому

    Can you explain what Options MultiViews is for?

    • @DevDrawer
      @DevDrawer  3 роки тому +2

      The Multiviews option allows the server to do a filename pattern match.
      For example, if it is enabled, /dir/foo may not exist so your server will look within /dir/ for a file with a name of foo.* It will then assign them as the same media and encoding as if you requested it by name, it will then choose the best match with the requirements of your request. Basically, it can help hide extensions so /dir/foo.php becomes /dir/foo
      Keep in mind that foo is a directory, it will use the index of the directory, not foo.php. I hope this helps.

    • @liveinhouse
      @liveinhouse 3 роки тому

      @@DevDrawer Thanks i understand now

  • @Mr.Rytman
    @Mr.Rytman 2 роки тому

    Do i need to make a “.htaccess” in the main folder, or can i just make one in my secret folder?

    • @DevDrawer
      @DevDrawer  2 роки тому

      The .htaccess file works per level so the main folder would cover all files and folders, but you can also place it in subfolders and it will only cover that folder. You can have multiples files that do different things.

  • @thenumbersw
    @thenumbersw 3 роки тому +1

    nice work bro

    • @DevDrawer
      @DevDrawer  3 роки тому +1

      Thanks, I am glad you like it

  • @siddhantchilke1159
    @siddhantchilke1159 Рік тому

    Great work. Thank you.

  • @nmature2003
    @nmature2003 3 роки тому

    If you are using the index.php MVC code, how do you setup a 404?

    • @DevDrawer
      @DevDrawer  3 роки тому +1

      Since you are routing the pages through your index.php, you would use functions or classes to set up the content. This includes the 404 page. I hope this helps.

  • @chiefkeeflovessosa
    @chiefkeeflovessosa 2 роки тому

    how can i make a folder forbidden for users to access??

    • @DevDrawer
      @DevDrawer  2 роки тому

      I have another video for advanced techniques that may help. Check it out here: ua-cam.com/video/aU48yQHh9q4/v-deo.html

  • @andresraso561
    @andresraso561 8 місяців тому

    great video

    • @DevDrawer
      @DevDrawer  8 місяців тому

      Great to hear. Glad you liked it

  • @chancenyasulu9972
    @chancenyasulu9972 Рік тому +1

    thanks you are best

    • @DevDrawer
      @DevDrawer  Рік тому +1

      Happy to help. Share the love.

  • @thawzin277
    @thawzin277 2 роки тому

    Wow wow wow great bro

    • @DevDrawer
      @DevDrawer  2 роки тому

      I am glad you liked it. I also have another video with advanced .htaccess tips in case you have not seen it: ua-cam.com/video/aU48yQHh9q4/v-deo.html

  • @mohamedaminelabidi9630
    @mohamedaminelabidi9630 2 роки тому

    thank you