Configure Apache with .htaccess

Поделиться
HTML-код
  • Опубликовано: 26 июл 2017
  • Learn to build a MVC PHP framework from scratch.

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

  • @apxplexie7318
    @apxplexie7318 3 месяца назад +1

    finally !!! thxs dude, as a web dev student starting apache i can't fathom how much this help

  • @somerandomsheat
    @somerandomsheat 6 лет назад +1

    hi from bangkok, 2;24am here and i found your videos, very helpful, really thank you. Great to repeat everyting again. i am going to have a interview for junior php developer position and must say that your videos made me relax and more confident. was actully nervous. thanks for explaining all in simple ways. appriciated

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

    its working now after many tutorials I watched finally I found the thanks sir.

  • @germanduterte7110
    @germanduterte7110 4 года назад +1

    awesome., verygood demonstration about .htaccess

  • @Yudibilly
    @Yudibilly 5 лет назад +1

    Good job

  • @sfcoxcms2445
    @sfcoxcms2445 6 лет назад

    Even though I somewhat already understand .haccess I'm still fuckin with you curtis.
    THIS IS A NOTE TO THE NEW COMER WHO IS MAYBE READING COMMENTS TRYING TO FIND THE RIGHT TUTORIAL, I BELIEVE CURTIS IS ON PROPER TASK, I AM GONNA CONTINUE ON AND FOLLOW THROUGH.
    Thank you sir.

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

    So clear tutorial very beneficial! May Allah bless you with Islaam if you arent yet!

  • @kimbaptempura4073
    @kimbaptempura4073 6 лет назад

    How do you enable server side include files

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

    Hi Curstis, I have a problem with htaccess file with windows 10 it doesn't work but with mac it's working

  • @user-eu5hg6ow3b
    @user-eu5hg6ow3b 6 лет назад +2

    Hi! Why should we do the line 5 if we have the !-d above on line 3? I mean, !-d == "don't use rewrite rule if this is a directory", and config, core, css, js are directories.

    • @illidan155
      @illidan155 6 лет назад +2

      lol ye, basically if u remove line 5 its the same, and also why not including QSA in rewriteRule?

  • @ritvars8956
    @ritvars8956 5 лет назад +18

    The .htaccess file did not work for me. I had to look around for some solutions and checked my error_log. Don't know why but I had to rewrite it to some degree and this is what worked for me :
    RewriteEngine On
    RewriteCond %(REQUEST_FILENAME) !-f
    RewriteCond %(REQUEST_FILENAME) !-d
    RewriteCond $1 !^(index\.php|config|core|css|fonts|js)
    RewriteRule ^(.*)$ ./index.php/$1 [L]
    Maybe someone needs this just try it out if your .htaccess file is not working and you get an internal server error or error 500...

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

    Yo Im getting an error my pc is running on windows:
    Server error!
    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
    If you think this is a server error, please contact the webmaster.
    Error 500
    localhost
    Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.4.1

  • @oussamasethoum2755
    @oussamasethoum2755 5 лет назад

    hi thanks for the video, how can i get ride of that additional word on the url ?

    • @CurtisParhamFreeSkills
      @CurtisParhamFreeSkills  5 лет назад +1

      Im not sure what you mean by additional word on the url. This is an industry standard because many developers found this to be a very good way to organize code and makes urls friendlier in the process. If you dont like the url structure this way Im not sure you will like working with the code in this way and you may be better off with a different approach. My encouragement to you though is to try this way and maybe by the time you build a project of your own this way you may really learn to love it. At the very least you will be ready for a job with other developers that work this way.

    • @oussamasethoum2755
      @oussamasethoum2755 5 лет назад

      Curtis Parham i mean for example, if the user typed in the url
      www.mywebsite.com/folder and if that folder doesn't exist i want to redirect him to the main page of the website which is www.mywebsite.com without leaving /folder in the url.

  • @Ujjal.0011
    @Ujjal.0011 4 года назад

    For those who want to learn more about .htaccess file -
    www.htaccess-guide.com/

  • @ventures9560
    @ventures9560 5 лет назад

    and what if you arent gonna use php?

  • @muhammadkhazin7607
    @muhammadkhazin7607 5 лет назад

    Mine does not work. The code is all correct. I don't use xxamp. I installed PHP 7.3 and Apache 2.4 manually. Is there any config I need to do with the server?

    • @CurtisParhamFreeSkills
      @CurtisParhamFreeSkills  5 лет назад

      Well I do believe you have to enable the ability for .htaccess files to modify server config, you may just need to look up how to enable that.

  • @vitche727
    @vitche727 4 года назад

    it doesn't work on real httpd server

    • @CurtisParhamFreeSkills
      @CurtisParhamFreeSkills  4 года назад +1

      It does work as long as you have mod rewrites enabled on the server and it has to be an apache server. If you are trying to use nginx you have to convert the .htaccess for that server

    • @vitche727
      @vitche727 4 года назад

      @@CurtisParhamFreeSkills You are right! Thanks