Skip to content

Tag: .htaccess

Hide file in directory

I want to hide files from sub directory From this mydomain.com/file/file.php To this mydomain.com/file/ Do you guys know how to do that? Answer In your home directory/.htaccess, add this line: This will do this work: mydomain.com/file/ => mydomain.com/file/file.php mydomain.com/foo/ => mydomain.com/foo/…

.htaccess rewrite with GET variables

am trying to create a url like this using htaccess… www.example.com/user/david what i have now is this www.example.com/user?username=david It works well when i do something like RewriteEngine on …

How to avoid false variable with htaccess and php

Hi guys im new in stackoverflow so here is my problem i have a controller file php and my htaccess if have this php controller and this htaccess my problem is if i type www.site.com/var1/var2/ this one is a real path so, is ok. but if i type www.site.com/var1/var2/hjwuwjais/ this url need show error 404 but s…

.htaccess redirect /subpage/ to /subpage?/wp-login

Trying to use .htaccess rule to do the wp-login JS check on first visit by appending ?/wp-login to the url since it’s interferring with Sucuri firewall when using password protection. I’ve created a test subdomain to try to get the htaccess redirect to work before using it on the live site: view h…

Configuring Symfony 5 Application on Apache server

I need some help with configuring Symfony on apache2 web server. My current project category structure is: var/www/domain.com/public_html Inside public_html is where my Symfony application is located. I am stuck at figuring our what I am doing wrong in my either .htaccess or /etc/apache2/sites-available/domai…