I’m struggling pretty hard with .htaccess. Even though I looked up quite a few solutions here, I couldn’t get to setup the following: I have a file called index.php. Inside the index.php I have a link like Clicking the link, should lead to a file in the same directory called post.php. Inside the post.php I’m grabbing the id through $GET[‘id’].
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
My php rooter is routing my css/jpg… files
I got a homemade php rooter with an htaccess rewriting rule but my public files are always getting catched by the rooter after I leave my landing page, blocking thoses sources on my other pages. index….
Protect files in folder on hosting linux using codeigniter php
Im doing a little application write in php with codeigniter hosted in hostinglinux i had no problems with create codeigniter interface with user login to access the application now i have a problem… i want to create some folder for the user to store some .pdf file like this picture what can i do to protect every single users folder
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
Want to rewrite php extension along with get parameter which does exist inside a folder not root
For example i have domain named as www.example.com , I have a url http://www.example.com/demo/content.php?gt=1 , I wanted to rewrite like http://www.example.com/demo/index.php , Here demo is sub directory , I am not sure how to do it , I tried in htaccess but gives me internal server error Answer I got your point add below code in your .htaccess
.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