1

I have this URL for each users on my site: http://appsite.com/dennis, I was able to get this done using a mod_rewrite routing found on appengine docs: https://developers.google.com/appengine/docs/php/config/mod_rewrite.

However I am looking to change it to something like http://dennis.appsite.com as this is more SEO efficient. I am unsure where to start from any help would be appreciated.

  • I've been doing research for hours now and I only found a lot of solution for Apache and not on appengine –  Feb 20 '14 at 08:23

1 Answers1

1

You can do it with a custom domain, but not on appspot.com.

Refer to the documentation on wildcard subdomain mapping on what's possible.

Once the request gets to your app you use the modify the mod_rewrite example you linked to to pull out the right path from the REQUEST_URI.

Stuart Langley
  • 7,044
  • 1
  • 20
  • 20
  • Thanks. I've tried your solution but `$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);` only gives me the string after the domain. –  Feb 26 '14 at 12:54
  • You might also need to pull in routing information from SERVER_NAME and HTTP_HOST as well, depending on how you configure your wildcard. – Stuart Langley Feb 26 '14 at 19:06