Composite C1 - 'URL Aliases' bug - 301 always goes back to 302 - c1-cms

I have downloaded the new version of 'Url Aliases' 1.0.3.
Whenever I set a 301 redirect - it goes back to 302 if I go back and look at it. I think this is a bug?

Url Aliases v. 1.0.4 is online. It fixes the issue.

Related

React app SPA on S3 AWS while refreshing the page shows 404 page

I have a SPA made with React JS on a S3 Bucket and I’m using Cloud Front to work through HTTPS and with a custom domain. When I refresh the page - if I have another Route that is not the BASE_URL (for example domain.com/something), S3 sends me a 404 error.
I also tried redirecting the error page to BASE_URL but it doesn’t work, it redirects me to the Http default domain that S3 provides me and again, it gives me an 404 error page.
I don’t know if there exists an alternative way to keep the URL without any change (domain.com/page) and avoid the 404 error the way a web server (apache) handles.
If you are using CloudFront to host s3 website, the effective way to get rid of 404 on reload of non-index route like www.google.com/about or similar non / is by the following steps:
Go to your CloudFront distribution
Go to Error Pages
Create a new error page with the following params:
HTTP Error Code: 404
TTL: 0
Custom Error Response: Yes
Response Page Path: /index.html
HTTP Response Code: 200
enjoy
credits going to this article https://gist.github.com/bradwestfall/b5b0e450015dbc9b4e56e5f398df48ff
You have two options. Either use CloudFront error page as a catch-all that redirects to / (you mentioned you tried setting an error page but did not detail what you did. This should work). The downside is that it will respond with the HTML page for all not found paths, even for mistyped CSS paths, for example.
The other solution is to use Lambda#Edge to rewrite the origin request path. This is a more customizable solution and you can define which paths you want to redirect to the root.

HttpIoException: Error posting to URL: Error 302 found

Since today I have the following problem while deploying a new version to Google App Engine from Eclipse:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/updatepagespeed?app_id=MY_APP_ID&version=1&
302 Found
Further debug info:
Unable to update:
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/updatepagespeed?app_id=MY_APP_ID&version=1&
302 Found
at com.google.appengine.tools.admin.AbstractServerConnection.send1(AbstractServerConnection.java:336)
at com.google.appengine.tools.admin.AbstractServerConnection.send(AbstractServerConnection.java:287)
at com.google.appengine.tools.admin.AbstractServerConnection.post(AbstractServerConnection.java:266)
at com.google.appengine.tools.admin.NoLoggingClientDeploySender.send(NoLoggingClientDeploySender.java:35)
at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:1168)
at com.google.appengine.tools.admin.AppVersionUpload.updatePagespeed(AppVersionUpload.java:588)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:209)
at com.google.appengine.tools.admin.AppAdminImpl.doUpdate(AppAdminImpl.java:572)
at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:58)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:433)
at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:158)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I simply have no idea what is going wrong, since I did not change anything significant in my code or setup.
Anyone any clues on what is going wrong here?
Updating to the AppEngine SDK 1.9.32 seems to solve the problem (I was using 1.9.30). Updating from Eclipse did not show this update, so I downloaded it manually. Now it works again!
Hope I can help other people with this. Anyone any idea why this update is not being pushed with the Google Updater site?
EDIT:
About the updating:
First download the newest App Engine SDK from Google.
Update from Eclipse is done by 'Deploying to App Engine' -> 'App Engine Project Settings' -> 'Configure SDKs' -> 'Add...' -> 'Select folder with newest SDK'.
Simple as that!

app.yaml working differently on Local and on the Cloud

I've been playing around with GAE for PHP. Here is my Github code and it is running at http://shining-weft-626.appspot.com/
~/form gives me a 404 online but works perfectly on my local machine. Someone help.
/form is (bizarrely) a reserved URL on appengine, you'll have to pick something else: docs
The URL /form is working fine.
You are getting 404's for the URLs /form/ and /forms, because they do not match anything in your app.yaml.
- url: /form
script: form.php
- url: /
script: index.php
You code looks correct, if you committed and pushed it as shown. I think that you may be getting an error when loading the app.yaml, because you point to directories that do not exist. Try adding /js and /images to your /assets directory. They are missing now. Commit, and push again.
(Or, delete those mappings from your app.yaml)

Static_files vs Static_dir Cache expiration header in Python App Engine

I'm using Google App Engine 1.7.2 / Python 2.7 and am trying to add client caching of static files.
When I specify static_dir in my app.yaml, the cache-control headers do not get set.
- url: /static/images
static_dir: static/images
expiration: "7d 0h"
However, when I switch the specification over to static_files, like the following, it does get set.
- url: /static/images(.*)
static_files: static/images/\1
upload: static/(.*)
expiration: "7d 0h"
Is anyone else seeing this? Am I missing something? I was under the impression that static_dir and static_files were equivalent if written like the above.
Thanks!
I realise your question was asked a while ago, but I came across it while searching for a similar issue and thought I'd answer it for others' benefit.
You've specified the static file handlers correctly.
The issue with caching may have been due to you being logged in as administrator in the browser (logged in to appengine.google.com). Running your application, without being logged in as administrator, should show caching working as expected. Here's a link to the 'issue'.

url not found when extending the default app engine url

goolge engine app with default url - http://6.version.myapp.appspot.com/ works, but http://6.version.myapp.appspot.com/test gives me a :
404 Not Found.
The resource could not be found.
my app.yaml file is as follows :
application: myapp
version: 6
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /test
script: pythonfile.py
- url: /.*
script: pythonfile.
testing locally works fine : localhost:8080 and localhost:8080/test - both work fine.
Above the number 6 just happens to be a version no. So I am guessing for any other number the problem will happen. If I make the 6th version the default and access the url without version no, it works fine with and without the '/test' extension on the default url.
"6.version.yourapp.appspot.com" is not accessing version "6" of your app, it's accessing the version called "version". Thanks to wildcard subdomains, if that version doesn't exist, the request goes to your primary version.
I suspect you're thinking of the old version naming scheme, under which version 6 would be "6.latest.yourapp.appspot.com"; now it's simply "6.yourapp.appspot.com".
Are you sure your handler should look like that if you've got python 2.7? I think it should be eg handler.app instead of handler.py and if you follow the guestbook example from the SdK it probably does exactly what you are trying to do. You can also read Nick Johnson's blog post from blog.notdot.net how to upgrade to python 27 the official way - I don't think you put the script names in your app.yaml, I think it's supposed to look like
pythonfile.app
or
pythonfile.application
I hope this helps.
404 Not Found is from errors in app.yaml file, not your python coding. Look into the 'logs' of your appengine console and you'd find more information relating to this error. A good place to start is with GAE's Python 2.7 introduction page since it is too long to list here.
Changes aren't numerous though it can easily break your app if u miss a step (as it did to mine).

Resources