Summary
Keywords
Full Transcript
In this PHP tutorial, you will learn the basics of apache configuration files & how to work with them. You will also learn how to rewrite URLs using .htaccess files & the difference between .htaccess & httpd.conf files and why you should not use .htaccess files. NOTE At 13:20 I copied htaccess content into vhosts config, if it does not work for you or you are setting rewrite rules globally then try the following instead: RewriteCond %{LA-U:REQUEST_FILENAME} !-f RewriteCond %{LA-U:REQUEST_FILENAME} !-d The reason for it is because LA-U (look-ahead URL based) is needed for the proper value of REQUEST_FILENAME in some cases. More info on it can be read on https://httpd.apache.org/docs/current/mod/mod_rewrite.html (search for LA-U) SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL 👍 Smash the like button 🤝 Subscribe to the channel & turn the notifications on 💬 Post comments, any feedback is greatly appreciated ⭐ Become a Patreon: https://www.patreon.com/programwithgio THANK YOU! LESSON 1.29 Course Outline - https://github.com/ggelashvili/learnphptherightway-outline Course Playlist - https://www.youtube.com/playlist?list=PLr3d3QYzkw2xabQRUpcZ_IBk9W50M9pe- RESOURCES Default locations of the apache configuration file by OS - https://cwiki.apache.org/confluence/display/HTTPD/DistrosDefaultLayout Context where the directives are allowed - https://httpd.apache.org/docs/2.4/mod/directive-dict.html#Context mod_rewrite - https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html virtual hosts - https://httpd.apache.org/docs/2.4/vhosts/ virtual hosts examples - https://httpd.apache.org/docs/2.4/vhosts/examples.html CHAPTERS 00:00 - Intro 00:38 - Apache configuration file - httpd.conf 05:12 - Virtual hosts 07:22 - .htaccess files
