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

Поделиться
HTML-код
  • Опубликовано: 8 янв 2025

Комментарии • 60

  • @dmdennislive
    @dmdennislive 11 месяцев назад +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  11 месяцев назад +1

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

  • @phillipsengineer
    @phillipsengineer 3 года назад +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!!

    • @DevDrawer
      @DevDrawer  3 года назад

      You're very welcome!

  • @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: ruclips.net/video/aU48yQHh9q4/видео.html
      This video and that one should cover most if not all of your .htaccess bases.

  • @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 8 месяцев назад +1

    Excel master class about the htaccess file.

    • @DevDrawer
      @DevDrawer  8 месяцев назад

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

  • @gabrielolivares2331
    @gabrielolivares2331 2 года назад +1

    This is really awesome tutorial. Great work man.

    • @DevDrawer
      @DevDrawer  2 года назад

      Thanks a ton! I am glad you like it.

  • @mr_howto-everthing
    @mr_howto-everthing Год назад

    Thanks bro, after struggling for 3 months🥰🥰

  • @tunarmemmedov196
    @tunarmemmedov196 11 месяцев назад

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

  • @Niqnex
    @Niqnex 7 месяцев назад

    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/

  • @abdoben833
    @abdoben833 3 года назад

    good explanation , all details I needed in one video.

    • @DevDrawer
      @DevDrawer  3 года назад

      Glad it helped. .htaccess files can be tricky.

  • @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 :)

  • @cepi24
    @cepi24 2 года назад

    Where is the video mentioned in the beginning? Thsnks

    • @DevDrawer
      @DevDrawer  2 года назад

      The video you are looking for is here: ruclips.net/video/ox8aeQ31PE0/видео.html

  • @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.

  • @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.

  • @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.

  • @siddhantchilke1159
    @siddhantchilke1159 2 года назад

    Great work. Thank you.

    • @DevDrawer
      @DevDrawer  2 года назад

      I am glad you liked it

  • @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.

  • @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

  • @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: ruclips.net/video/aU48yQHh9q4/видео.html

  • @thenumbersw
    @thenumbersw 3 года назад +1

    nice work bro

    • @DevDrawer
      @DevDrawer  3 года назад +1

      Thanks, I am glad you like it

  • @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.

  • @chancenyasulu9972
    @chancenyasulu9972 2 года назад +1

    thanks you are best

    • @DevDrawer
      @DevDrawer  2 года назад +1

      Happy to help. Share the love.

  • @andresraso561
    @andresraso561 9 месяцев назад

    great video

    • @DevDrawer
      @DevDrawer  9 месяцев назад

      Great to hear. Glad you liked it

  • @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: ruclips.net/video/aU48yQHh9q4/видео.html

  • @mohamedaminelabidi9630
    @mohamedaminelabidi9630 2 года назад

    thank you