Url Routing/Rewriting in ASP.NET - asp.net

We want to add some more data tracking to our website and we want to attach a keyword onto the end of a url.
I have something like this
http://www.samplesite.com/t/1/video/123456
http://www.samplesite.com/t/2/video/123457
http://www.samplesite.com/t/3/video/123458
and I want it to look like this
http://www.samplesite.com/t/1/video/123456/funny
http://www.samplesite.com/t/2/video/123457/sports
http://www.samplesite.com/t/3/video/123458/informative
I've been searching the internet trying to figure out how to do this and I haven't really come up with anything. I'm able to paste those urls in and get to the right page but I don't actually know how to make those pages have those urls when they load. I realize this question is pretty open ended but I'm basically looking for some starting points on some more searches as I don't think I've been phrasing things the best. Thanks in advance.

If you're using IIS 7 or 7.5 you can use the Microsoft URL Rewriter module, otherwise there are some third party ones for IIS6 and 5.
http://www.iis.net/downloads/microsoft/url-rewrite
There are several examples at:
http://www.iis.net/learn/extensions/url-rewrite-module/using-url-rewrite-module-20
So are you saying you go to one of those URLs and it shows what you expect, but the URL is changing (so it doesn't have the suffix)?

Have you tried using urlrewriter?
A few references :
http://dotnetguts.blogspot.in/2008/07/url-rewriting-with-urlrewriternet.html
http://www.tutorialized.com/tutorial/URL-Rewriting-in-ASP.NET-using-URLRewriter.Net/38861
http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/
Hope this helps you.

Related

How to hide domain name before path?

I was looking for something new for wordpress, I was trying to find all the paid and free plugins but there is no way to hide the domain name in the path.
I would like to ask if Wordpress can do this?
Can you help me with something to get url like in the picture ???
That is a local URL, so they have to be stored locally on your machine and loaded in by a file located on your machine.
If I am reading this correctly than just do what the image says. It isn't that hard. I did it countless times. If you mean like how to hide domain names in the link than refer to this link and scroll down and go to the "external" tutorial area. And if you mean like in javascript than refer to this link and go to the external part of the page. If this didn't help you or I misunderstood than please put more information.

How to refresh facebook scrape cache for a whole site

I need to re-scrape facebook's cache for every page in my web site (3000+ pages)
The only way i know how to do that is too tough Open graph debugger
I Cannot run this with 3000...
I read From Facebook developer support page that this (StackOverflow) is the place to ask questions but there is little to none knowledge about refreshing facebook url cache
Can you please suggest any working solution to re-scrape a page?
my web site: Mentallica
One possible answer, given the number of URL's you've got, is to use the batch invalidator. You could go to an access list of your URL's, or maybe do a recursive directory listing and replace the folders with URL's (if it's a flat site), or the like. At least, you don't have to do them one at a time. Once you have a list, paste the list into the invalidator (multiple lines).
The batch invalidator is here:
https://developers.facebook.com/tools/debug/sharing/batch/
It IS frustrating. I've searched several places, and don't really see a solution. We have a website with all of the proper tags, yet FB refuses to refresh any past posts with the new website data.
3 years later, but this can help someone: Paste yout url here and click fetch new scrape information: https://developers.facebook.com/tools/debug/og/object/

OAuth 2.0 REDIRECT URI

my UpdraftPlus Backup/Restore was working and backing up to Google drive.
But now the REDIRECT URI has changed on the Google Cloud Console Side.
it should end with
/options-general.php?page=updraftplus&action=updraftmethod-googledrive-auth
however it keeps truncating after the Ampersand and shows up like
/options-general.php?page=updraftplus
any help on how to set the right URI?
I also faced the same problem yesterday. It looks like a bug of Google Cloud Console to me. I managed to solve this by using "percent-encoding" in the URL for the ampersand symbol. Ampersand symbol shall be encoded as %26. So you shall enter your url the following way:
/options-general.php?page=updraftplus%26action=updraftmethod-googledrive-auth
Another option you could try (but I don't think it will be necessary) is to swith back to the old view. It looks like that in the old interface there is no problem with ampersand. The link to the old interface is at the left bottom corner (it is quite hard to find it).
By the way I've also described this solution here (but it is in Russian :)
In the latest UpdraftPlus release, we worked around this by only having one parameter in the URL!
Best wishes,
David

Find the actual page opened from the URL in the asp.net

HI so i keep running across websites which when looked through or searched (using their own search function) return's a static URL ie.) ?id=16 or default.aspx no mater what page of the website you visit after the search has been performed. This becomes a problem when i want to go directly to a post/page within one of these sites so i'm wondering. If anyone knows How could i actually find out what the absolute URL is.
So that i can navigate straight to it. I'm not really familiar with coding but have tried looking in the page source but i wasn't really able to gleam anything from there.
The basics around asp.net urls: http://www.codeproject.com/Articles/142013/There-is-something-about-Paths-for-Asp-net-beginne
It all really depends on what you're trying to find, as far as finding a backway to locate a absolute path, is highly doubtful. If the owner of the site(most blogs) want you to have a perma link to a page, they use url-rewriting for putting things in the URI like title page and such. Alot of MVC sites do this now.
The '?id=16' you're seeing is just a query string, a holder for other logic they are doing.

Web Site URL for analytics-tracking in a Spotify-App?

I want to track pageviews and userinteractions in a Spotify-app.
Spotify says it's possible: https://developer.spotify.com/technologies/apps/guidelines/integration/#usertrackinganalytics
Which »Web Site URL« do i enter when setting up a property for analytics-tracking in a Spotify-App?
Or am I doing it wrong and have to do it in another way?
It doesn't matter.
You can use a fake one if you will.
The only place where GA uses that is when creating links back from the reports to your website. Since your website doesn't exist, it's more like an extension from what I understand. Then you don't need those links anyway.
If feeling not-creative just use:
http://my-spotify-app.com

Resources