Skip to content
Advertisement

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/foo.php mydomain.com/bar/ => mydomain.com/bar/bar.php The idea is to repeat the directory name as filename + .php extension in your real

How to do 301 redirections after WordPress Permalinks change

I changed the Woocommerce permalink structure of my site and I would need some 301 redirections Help. Woocommerce product permalinks were configured according to the structure: And now according to the structure: What lines do I need to add to the .htaccess file to do 301 redirections, please? UPDATE: /shop/%product_cat%/ is a Permalink Structure in WordPress that means example.com/shop/category1/subcategory1/MyProduct and

.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 still show file.php because

.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 here: testing.no11.ee/protectedpage Unfortunately this does not add the

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/domain.com.conf files. I am using symfony/apache-pack. My .htaccess files live inside /public folder as per documentation. Here

Advertisement