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
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.
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/
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
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.
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.
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.
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.
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.
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.
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.
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
Thanks for watching. I am glad it helped you out.
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!!
You're very welcome!
Thank you, I have been looking for something like this for a long long time. Top Man :-)
There is also a part 2 with a few more commands.
Thanks Dev Drawer! I'll be joining this channel.
That is great to hear. Glad you could make it.
Excel master class about the htaccess file.
Thank you for watching. I am glad it made an impact.
This was amazing. Been trying figure this out all week.
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.
Thanks bro, after struggling for 3 months🥰🥰
Happy to help
hey , in htaccess file i consistently get engine rewrite not allowed here error,what can cause it
Great work. Keep it up...
Thanks.
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?
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/
This is really awesome tutorial. Great work man.
Thanks a ton! I am glad you like it.
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
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.
@@DevDrawer thanks v.much for taking the time to reply - will investigate link - thanks again for original video - Weekend well :)
Quick question: In the RegEx, should your forward slash next to your whitespace be escaped?
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.
Where is the video mentioned in the beginning? Thsnks
The video you are looking for is here: ua-cam.com/video/ox8aeQ31PE0/v-deo.html
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.
It is written in Apache. Not really a programming language but more of explicit directives for an Apache / Linux server.
@@DevDrawer alright. Thank you. Will try to find some tutorial for total newbie.
At 15:33 you forget to escape the dots. And why did you switch the L and the R=301?
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.
good explanation , all details I needed in one video.
Glad it helped. .htaccess files can be tricky.
bueno video, estaba buscando como funciona framework laravel con htaccess, gracias !
Gracias por ver, me alegra que te haya gustado.
Can you explain what Options MultiViews is for?
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.
@@DevDrawer Thanks i understand now
Do i need to make a “.htaccess” in the main folder, or can i just make one in my secret folder?
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.
nice work bro
Thanks, I am glad you like it
Great work. Thank you.
I am glad you liked it
If you are using the index.php MVC code, how do you setup a 404?
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.
how can i make a folder forbidden for users to access??
I have another video for advanced techniques that may help. Check it out here: ua-cam.com/video/aU48yQHh9q4/v-deo.html
great video
Great to hear. Glad you liked it
thanks you are best
Happy to help. Share the love.
Wow wow wow great bro
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
thank you
Your welcome.