How To Use .htaccess Files - Advanced Tips and Tricks - #86

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

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

  • @cacurazi
    @cacurazi 5 месяцев назад

    TIL that the .htaccess file is actually your firewall!
    Informative. Thanks!

    • @DevDrawer
      @DevDrawer  5 месяцев назад +1

      It can be. A lot of server directives can be put there and they are run prior to access to your server so it can be used that way.

  • @SidewaysY
    @SidewaysY Год назад

    Thank you! I moved a site from one place to another and my php was displaying, not rendering. I found you when figuring out why. I needed this!

    • @DevDrawer
      @DevDrawer  Год назад

      I love to hear it. Glad it helped you finish the move.

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

    Do you use any of the directives? I use most of these on every website I build, especially speed optimization. Let me know your fav.

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

    nice. thanks for great guide

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

      Glad it was helpful!

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

    Maybe I missed this in your video, but how to redirect a folder together with its content (files), so that I don't have to redirect each file separetly? My goal is to prevent typing a path to a folder or file that exists and seeing its source code in the browser.

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

    Any info on where i can learn about the syntax of the configurations

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

      I would start with the Apache Software Foundation, they have docs for it here: httpd.apache.org/docs/2.4/

  • @lunaticochats
    @lunaticochats Год назад

    Will you continue with the course or not?

    • @DevDrawer
      @DevDrawer  Год назад

      I do a lot of projects to try to make it easier to learn more things. I have 2 htaccess videos on the channel. If they do not cover what you need to know, let me know how can I expand it to more videos but I covered pretty much everything I usually use.

  • @scopedreams5931
    @scopedreams5931 4 месяца назад

    what extension are you using to run the .htaccess file? cant seem to get them to run on my vscode

    • @DevDrawer
      @DevDrawer  4 месяца назад +1

      The .htaccess file is a server directive file so it cannot be run from VS Code. You have to create the file and place it on an Apache server. Here is a link on how you can setup and enable .htaccess on your server: phoenixnap.com/kb/how-to-set-up-enable-htaccess-apache

    • @scopedreams5931
      @scopedreams5931 4 месяца назад

      @@DevDrawer thank you for the help!

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

      No problem. Glad I could help

  • @pfranklin
    @pfranklin Год назад

    I am farely new at this. What is the syntax to call a CSS file in Apache2 using Autoindex? I have tried a few things I have found online (my environment is Linux 22.04 LTS). I am familiar with normal html and css where there is a set html file, but this one seems to be auto generated on call.

    • @DevDrawer
      @DevDrawer  Год назад

      Sorry, I am not following the question. My best guess answer would be to use "/thecssfolder/thecssfile.css". That will point it directly to the CSS file. If the filename is autogenerated, I would use something like Gulp to run a script that moves it to a predetermined folder and name once it is generated.
      If that is not possible, maybe using JS to get the file and add a reference to it once the site is loaded.