The 'script' element won't work for static files like HTML files. You should use the 'static_files' element, for example:
handlers: - url: / static_files: index.html upload: index.html A good idea is to put static files in their own directory, for example: handlers: - url: / static_files: static/index.html upload: static/index.html Some references: Using Static Files <https://cloud.google.com/appengine/docs/php/gettingstarted/staticfiles> Static file handlers <https://cloud.google.com/appengine/docs/php/config/appconfig#PHP_app_yaml_Static_file_handlers> On Thursday, November 19, 2015 at 5:02:07 PM UTC-5, JeongWon Seo wrote: > > I am having trouble with converting the following .htaccess file to > app.yaml > > <IfModule mod_rewrite.c> > RewriteEngine On > > RewriteRule ^$ /index.html [L] > > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^ index.php [QSA,L] > </IfModule> > > what I did is as below (not working) and I have both index.html and > index.php > > app.yaml: > > - url: / > script: index.html > > > - url: /.* > script: mod_rewrite.php > > > mod_rewrite.php: > > $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); > if (dirname($path) == '/' && pathinfo($path, PATHINFO_EXTENSION) == 'php') { > $file = pathinfo($path, PATHINFO_BASENAME); > } > else { > $file = 'index.php'; > > } > > $_SERVER['SCRIPT_NAME'] = '/' . $file; > require $file; > > > > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/51c629b7-3b72-499f-b842-29122ed193b9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
