Setting / changing the default ("index") page in a LiftWeb app - lift

I've googled like crazy but can't find an answer to this.
How do I change the page displayed for http://www.mydomain.com/? (Right after the web app is created the page defaults to index.html. I'd like to change this!)

You can't change it.
Lift converts the request for "/" to List("index"). Any "blank" part of the request path is converted into "index". Thus, the "index.html" template will be used to serve "/index" and "/".

Related

Windows IIS Rewrite URL

I have a page located at 'ourdomain/FolderName/ourpage' and have a redirect set up so that users can go to the link 'ourdomain/ourpage' and have it link to it. This works fine, however the URL bar still displays the long ugly 'ourdomain/FolderName/ourpage'.
I have the following URL Rewrite rule set up, however it seems to be doing nothing at all, the long link remains after hard-refreshing and restarting the web server. Do I have something set up incorrectly? (edited the real folder/page names out in screenshot for privacy sake)
URL Rewrite configuration
The pattern for the url rewrite shouldn't include the domain name.
The pattern should only be the url's path and shouldn't include the domain name.
The url rewrite rule should like below
Please modify the pattern part to ourdomain/FolderName/ourpage and test again.

How to use URL parameters in Flutter Web?

I want to make it so when a user enters the URL of the app they'd get the same page, no matter what they added after the '/', but have a string stored in the code with the value after the '/'.
for example: if they enter the URL "exampleurl.app/blabla", the String would have the value "blabla".
I managed to that somewhat with Uri.base, the problem is that after the app loads the URL removes all the text after the '/' automatically, and whenever I reload the site it reloads it without the URL with the text removed.
Also if the current URL in the tab is already of the app ("exampleurl.app/nomatterwhatsaddedhere"), it assumes that it is the same URL and doesn't even reload.
It would be greatly appreciated if someone could show me a way to get the string from the URL without these issues.
Thanks in advance!
You need to use Navigator 2.0 for this kind of functionality. I recently wrote a short series that explains simply how to implement Navigator 2.0. It goes into detail explaining how to work with the URL in an app for similar functionality to what you are after, though you will need to tweak it for your use case. It provides a detailed walkthrough along with sample code available on GitHub.
A Simpler Guide to Flutter Navigator 2.0

Rewrite .html files in Netlify

I am trying to rewrite patterns like /abc.html to /search?xyz=abc. 'abc' can be anything.
I've gone through the documentation at https://www.netlify.com/docs/redirects/
Here's what I have now in my _redirect file, but it doesn't seem to work. Kindly help.
/*.html /search?xyz=:splat 200
Disclaimer: I work for netlify
Our redirects functionality does not work to do rewrites like that. Placeholders like slugs (/blog/:year/:month/:day/:title) and stars (/assets/*) are only matched as full path components - that is, the thing between slashes in a URL or "everything after this / including files in subdirectories".
It's not an uncommon feature request, but our system doesn't work like that right now.
Some ways you can achieve similar goals:
usually you aren't intending to redirect existing paths. This portion of the docs demonstrates that a standard redirect (/articles/* /search?xyz=:splat 301) will redirect all requests for missing content - be that /articles/1 or /articles/deep/link/that/was/tpyoed.html - to /search with a xyz parameter of the pathname . This doesn't do exactly what you asked - but it is probably the closest thing and you can hopefully handle the paths appropriately in your /search page. In case you have any contents under /articles, that will still be served, and not redirected, since you didn't put a ! on the redirect to force it.
if you have a single page app that does its own routing and use a history pushstate redirect you could make the router do the right thing for your content since usually there is only one .html page on your site and any other paths would be redirected to it (where the router takes over with whatever smarts you give it)

redirect wordpress calls to a page

I'm not really sure what is the best way to do this. Say you have set up a page like so:
www.myblog.com/page1
Is it possible to, specify that the request to any of the subpages under page1 be redirected to a single page? Say if I had page1.php as one of my pages, any URL that is prefixed with:
www.myblog.com/page1/...
wordpress would use that file to generate the page.
Basically, I have some custom content that I want fetched with php, and it depends on which subpage is being loaded. The format of the custom content is always the same, only the 'arguments' differ. Is there a way to do this within Wordpress? And if not, where should I should I start looking to implement this?
Thanks
try modifying .htaccess file and rewriting url so all requests for /page1/page2 will be rewrite to /page1=?page=page2 or something like that

Facebook: Application Menu points to Connect URL for Facebook application

I have an IFrame app, and I would like to use some Connect features using javascript.
But when I set the Connect URL in the application settings, it then causes two problems.
1) The link for the app in the Application Menu now points to:
http://mydomain.com/myapp/
instead of:
http://apps.facebook.com/myapp/
2) The request opens in a new window (instead of the same window, as other apps do)
Is there any way to fix that? I'd like my application continue to use http://apps.facebook.com/myapp/ even after setting the Connect URL
Many thanks for reading
Well,
after 3 months you guys probably found out the answer. But as many others might have the same problem, as I did, the correct configuration seems to be the next one:
In the Canvas Callback URL you insert your serverĀ“s URL (where the work really happens)
In the Bookmark URL you insert something like this: http: slash slash apps dot facebook dot com slash YOURCANVASNAME slash - i.e., if your canvas name is acmeenterprises, so your Bookmark URL has to be http: slash slash apps dot facebook dot com slash acmeenterprises slash
The Connect URL is the main URL of your host - normally.
Hope it helps!
Alexandre.
I have the exact problem - on some pages (like profile settings) it shows iframe URL, and on some - correct apps.facebook... URL.
There is similar topic on fb forum. Seems like general bug
http://forum.developers.facebook.com/viewtopic.php?id=33364