Unable to get urls to work without .php

41 views
Skip to first unread message

Bhupinder Jeet Singh

unread,
Dec 15, 2017, 12:51:07 PM12/15/17
to Google App Engine
I have a project structure as attached. I accidentally setup the PHP Flex environment not knowing the consequences that Mod-rewrite would not work as the .htaccess in my project. I want to be able to run the project structure as it is. When i type https://gettfit-d2079.appspot.com/ , it should automatically redirect or show the index.php but it keeps show 404 error i guess because the handlers are not defined. Can someone please share with me a app.yaml file with handlers for my structure. I am new to GAE. 

app.yaml
env
: flex
runtime
: php


handlers
:
- url: /(.+)
  script
: mod_rewrite.php (even having this has no effect)

Screen Shot 2017-12-15 at 9.34.23 PM.png

George (Cloud Platform Support)

unread,
Dec 15, 2017, 3:49:34 PM12/15/17
to Google App Engine
Hello Bhupinder, 

You are right, you need to define handlers for your app. This is done by indicating the needed paths in the app.yaml file. Detailed related information and examples are provided on the "app.yaml Reference" page, as well as the "How Requests are Handled" page, or int the "Configuring your App with app.yaml" document

You are right about the 404 error code as well, it does mean that the address is not found. You can check at any time the meaning of these error codes on the "HTTP Status and Error Codes for JSON" page

This forum is meant for general discussion and voicing of opinions. For programming problems it is better to read dedicated forums such as stackoverflow, where programmers are active and ready to help. 

Bhupinder Jeet Singh

unread,
Dec 16, 2017, 2:17:43 AM12/16/17
to Google App Engine
Thanks George will do the needful. 
Reply all
Reply to author
Forward
0 new messages