Report this

What is the reason for this report?

Htaccess and subdomain issues

Posted on July 18, 2016

Hi,

So I’m having some issues with a subdomain which I can’t fix after reading a lot through the internet.

I’m trying to set up an api subdomain which purpose is to respond http requests, so my index file is just a php that redirects to the web (which is working fine).

I have an .htaccess with redirects things like api.domain.tld/createuser to api.domain.tld/api/user/create.php, but it is not working (I’m getting 404 error code). If I do the http request with the long url it works fine.

Also, just in the case it is useful, I’ve added an info.php to check phpinfo() and I’m getting a 500 error code.

Can anyone help me out? Thanks

NOTE: I’ve already checked:

  • In /etc/apache2/apache2.conf, in directory /var/www AllowOverride All is set.
  • Mod_rewrite is enabled, checked via phpinfo()

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.