Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
   if (!-e $request_filename){
        rewrite /iOS/(.*jpg)$ /$1 last;
        rewrite /iOS/(.*jpeg)$ /$1 last;
        rewrite /iOS/(.*png)$ /$1 last;
        rewrite /iOS/(.*css)$ /$1 last;
        rewrite /iOS/(.*js)$ /$1 last;
        rewrite /Android/(.*jpg)$ /$1 last;
        rewrite /Android/(.*jpeg)$ /$1 last;
        rewrite /Android/(.*png)$ /$1 last;
        rewrite /Android/(.*css)$ /$1 last;
        rewrite /Android/(.*js)$ /$1 last;
        rewrite ^/(.*)$ /?route=$1 last;
    }

There are some vanity URLs e.g. mysite.com/yourdetails which are handled internally by a router class (its a PHP app with index.php as the entry point) and they seem to work fine on nginx but not Apache :-/

I tried this but the vanity URLs are not working

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?route=$1 [L]

I'd like to rule out Apache config first before I get too deep into the code.

share|improve this question

1 Answer 1

Turns out they were working fine in all browsers other than Chrome Canary which was sending a user agent which the App wasn't recognising (it's a mobile app and the user agent extension for chrome was doing something funky.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.