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 google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
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/7efbd211-e0d8-456a-8ff9-9f0e3acfbb85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to