Remove controller and method from URL Path in .Net Core 6.0 - url

Could any one please help me out with situation.
I have project whereby I want to remove each Controller and Method from my url path every time i request.
example right now my every time url looks like below
www.mywebsite.com/Account/View
but i want to remove /Account/View from url

Related

elm application keeps changing init url

I have a project I that was dropped onto my lap written in 0.18, when ran it keeps changing the url from a sub url we currently load it from to the base url of the page, for example the elm application is loaded via http://example.com/dah/dah/elm#welcome. After application renders the url switches to http://example.com/#welcome. I would like to make sure the application stays at the url it was loaded at like http://example.com/dah/dah/elm#welcome and not http://example.com/#welcome. Would appreciate anyones feedback if possible
I thought there would be a simple config that would allow me to just say have the application run from base url http://example.com/dah/dah/, I could not find anything, I also looked at documentation https://dmy.fr/elm-0.18-packages/ specific for 0.18, navigation https://package.elm-lang.org/packages/elm-lang/navigation/2.1.0. Not quite sure if that was the right link. I could not find anything relevant.

Brackets Shell URI

Does anyone know if Brackets Shell uses any URI except the file://...index.html format? I want to point a web service back to the shell and need to provide a valid URI with the URL. The problem is that I noticed that the URL for the index file uses basic system paths and this can change per system or user configuration.
Any way around this little problem?
Edit:
I am trying to access the Instagram API through brackets shell. In order to gain an access token to the OAuth method they use I need to redirect the user to the Instagram Login page to log in then grant access and then Instagram will redirect them back to me based on the call back or redirect url provided from me. If it was as simple as providing just the URL when the call was made I would be fine however to get a client key (which is also needed to access the api) I need to provide the correct call back URL once the key is made and since the shell seems to have no custom file path it's almost impossible to predict the file path based on each users setup on their own pc's. I hope this made sense :)
I searched the source of the brackets-shell, but couldn’t find the startup path. A quick workaround would be adding a meta-refresh to your index.html which redirects to the corresponding URL of your web service.
For example:
<meta http-equiv="refresh" content="0; url=http://example.com">
If you don’t want to select your index.html each time you start your custom shell, you should place your index.html at
Mac: Brackets.app/Contents/dev/src/index.html or Brackets.app/Contents/www/index.html
Win: dev/src/index.html or www/index.html (these folders must be in the same folder as Brackets.exe)
Linux: dev/src/index.html or www/index.html (these folders must be in the same folder as the Brackets executable)
You can get the current location through javascript using
document.location.href
this will return a string like
"file:///C:/Program%20Files%20(x86)/YourApp/www/index.html"
which you might try sending to Instagram. I'm not sure if they will accept file URI's though.

I want to use an HTML page in my grails app. But Not able to

I am using grails 2.0.1 and i tried linking to the html page using with the direct url="somefile.html> but it is not working out . How do i do it ?please help
You need to do two things:
Make sure the file is stored under web-app/somefile.html, this is where you store raw files for the server.
Instead of using a hard-coded URL, use the g.resource() method or the <g:resource> tag. In these cases, you'll use it like so:
My Link
The reason to use the g.resource tag is it guarantees a correct link to the file. If you just hard code the file like href="somefile.html", then is is a relative path. If you are at the URI myapp/controller/action/foo, it will look for the file under myapp/controller/action/somefile.html.
Note: If you are using the cached-resources plugin or something similar, you will find the output URL is not actually myapp/somefile.html. The file is still accessible from that location, but the generated links will point to a static URL instead.

ActionScript FileReference upload onComplete

I am a complete beginner in Flash & Actionscript.
My pet project is this: To provide a www.imageshack.com like service where people could upload single images and later anyone can view it using the generated url.
So far I have gotten to upload an image using Flash and store it in a directory.
http://pixels.guygar.com/
You can check the uploaded image at:
http://pixels.guygar.com/warehouse/
The issue being, I was under the impression when the PHP file is called to store the image in the folder /warehouse the browser would automatically navigate to:
http://pixels.guygar.com/upload.php
Where I can process the image i.e. generate a unique file name and provide the user with a unique URL to later access the resource.
What is happening is the image gets uploaded by the PHP script but the browser page still stays the same page even when providing a new url in the PHP script.
So the question is how do I go about so that a new URL (image resource linked) is passed back to the flash so that onComplete is called I can navigate to image that was just loaded? Or other ways of doing such?
I welcome your perspectives on this issue and thank you for your guidance.
i would store all values that you need later on in a session on the server (don't forget to pass the sessionID to the upload-script via GET).
at the end of the PHP script you just return "ok" (or "ko" if sth went wrong) to flash and then (in the callback/listener) call/load a second PHP-script that's doing the rest ... and returns you an URL to a thumbnail or whatever you want to do.
hope this points you in the right direction ...
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html?filter_flash=cs5&filter_flashplayer=10.2&filter_air=2.6#event:uploadCompleteData
Shows how data can be returned to flash after an upload.

How To Dynamically Route to Downloads

Basically, this is what my app does:
It sends an AJAX request
The server creates a file
The server sends back the URL of the
file location
The client-side will attempt to
create a dialog to download the file
at that location (probably using a
frame? I haven't got this far yet).
My question is, how do I dynamically route to the files I create so that they are accessible when you browse to them? If I don't add a route for them, then they will get a 404 if they try and access the directory they're in.
The files are currently stored in a folder in public.
Would the best way to deal with this make the folder somehow not require a route, so that it can be browsed to directly, and then have an index page on it so they can't view the full list of files? If so, please let me know how I can accomplish this. And on a side note, if you have an idea of how I can accomplish JS displaying the download dialog let me know.
It's Rails 3 by the way.
Thanks!
For a full private set of files: choose a place for your files outside your public directory, then configure X-SendFile support in your web server and finally use send_file in your rails application.

Resources