I’m struggling with my .htaccess file and setting it up the way I want it. The main function is a website that gets the language from the subdomain and the current page from the subfolders. Requirements I have three requirements that I need my .htaccess file to do; Wildcard subdomain redirected to lang variable Subfolder(s) redirected to page variable Local
Tag: apache
XAMPP localhost – Access denied error 403 after changing directory
I’m using php storm for a project and I tried to change from the built in web server to the apache one as it messed with my url redirections. Using a mac, I changed the directory to this one : After restarting the server, typing localhost in the search bar should direct me to the index.php file but I get
Generic way to rewrite external /api/entity/1 URL to internal /api/entity.php/1 (or /api/entity.php?id=1)
With a API I’m trying to make in PHP I currently have these rewrite rules setup in the .htaccess file for the root directory of the API: This is so that requests to the API appear more “RESTful” – so instead of api/entity.php?id=5 it would be api/entity?id=5 – I’d like to go a step further though, and allow a request
My Routing.php doesnt work properly after switch from nginx to apache
I am working on a small project on my local machine (in a nginx docker container) and I today was the first time when I uploaded it to my webserver and found out that it’s an apache server. Everything works fine, except for my router.php. When I visit example.com/admin I get an error 404 on my apache server but in
.htaccess file is not working in my Server
My site is located in https://itjmovies.com/milan/public/ and I want to rewrite the URL by .htaccess file. From https://itjmovies.com/milan/public/ To https://itjmovies.com/milan/ but it is not working. And also https://itjmovies.com/milan/public/auth/index.php?page=new To https://itjmovies.com/milan/public/auth/new/ but this is also not working. I have kept my .httaccess file in /www/wwwroot/itjmovies.com/milan/.htaccess My .htaccess file: Thank You 🙂 Answer I’m not sure that your edit made your question
Problem with ‘apache_getenv’ since upgrading to PHP 8
I’m hoping to get some help with an Apache/PHP 8 issue I’m encountering. Since upgrading to PHP 8 on my LAMP server, my logs have been outputting the following error: I’ve done a quick debug with var_dump(is_callable(‘apache_getenv’)) and the value returns as bool(false). I’ve attempted: Disabling PHP 8, restarting Apache, re-enabling PHP 8, and restarting Apache again Restarting my whole
.htaccess remove URL path segments that are causing an Internal Server Error
The following .htaccess Rewrite below seems working fine if the URL is something like: example.com/news/post-1 However, if the URLs have more parameters, something like: example.com/news/post-1/comment-page-1 (URLs from another version of the website) I will get a 500 Internal Server Error. How I can make it redirect to the related post instead of 500 Internal Server Error? Answer if the URLs
Get Ip From Client Apache and Php
Want to ask, but maybe this question is a duplicate. I’m sorry that all the answers to the other questions didn’t work in my case. Question I have a server with apache as webserver running php+7.4 with default settings and certbot as SSL with public IP 192.168.1.11, I want to retrieve the IP of the client that opens my website,
React app not sending files to php server with Ajax
I’m hosting a react app on my apache server. I’m using react-images-upload npm package to receive an image from the user then post it to my php server with Axios. However when I check the php $_FILES array in the response it’s empty. I have tested wether my server can receive files with a little upload form on the php
How does WordPress convert directory requests into database generated pages?
This is a curiosity based question, rather than being related to any issue. I wondered how Wordpress rectifies pseudo URL addresses (e.g. blog.com/posts/2015/05/05/example_blog_post) to php generated pages? What are the mechanics behind this redirection process? Answer This is actually a rule from the server config, not the CMS specifically. For instance, the common Apache config is: The second-to-last line if