ASP Classic - How to set up Permalinks. URL rewrite? - url

We have a web project which we are working on (Custom CMS). Have a url example http://www.test.com/page.asp?PID=191
Is there not an way to change this url into something like http://www.test.com/product-title/
Any help would greatly be appreciated.

An old method of doing this was to use custom error handling. Using a 404 custom error handling page you can trap a request to http://www.test.com/product-title/ pull it apart and build the request to the resource in this case http://www.test.com/page.asp?PID=191.
There are various ways of doing this from storing the values in a database so you can lookup your friendly address against it's equivalent to using the URL to describe the resource, something like http://www.test.com/products/191/ then using this as the basis of your rewrite.
In newer versions of IIS though (7 and above) you can use the URL Rewriting to build translation from one URL to another on the fly.
Links
URL Rewrite (download link)
Using the URL Rewrite Module

Related

Umbraco 7.4 URL Redirect Feature

Is there an available URL redirect for Umbraco 7.4? I mean I'm aware that there is a URL Redirect Management Tools in Umbraco 7.5 but we are using the lower version and it doesn't have that. Is there a way to achieve the same result? The scenario is this.
We created an web.com/about-us page. Now this is cached in google search now.
We then decided to change about-us to corporate now the cached version is still pointing to about-us where in fact the new URL now is web.com/corporate
How can I achieve a URL redirect? If someone manually typed or clicked on the cached url like about-us how can Umbraco 7.4 redirects it to the correct site? Would appreciate a step by step process if possible since I'm still new in Umbraco
you can use something like SEO Checker to manage this for you - there are also other plugins available that can do the redirection management.
https://our.umbraco.com/packages/website-utilities/seo-checker
As my first post has been hidden due to lack of detail, which is understandable, I am adding this new answer with more details.
We use UrlTracker for our projects - it is a nuget package that you install and then you can start using it. This can help.
The Url Tracker is used to manage URLs within umbraco and it automatically tracks URL changes, for instance when a node is renamed, this makes sure the old URL will redirect to the new location. Using this; you can also create your own redirects, based on a simple URL or using a Regex pattern. This is especially handy while migrating existing indexed URLs to your new website.
Please check this umbraco package web page for more details. Alternative links can be found below, hope this helps.
https://24days.in/umbraco-cms/2013/sharing-is-caring/
https://www.marceldigital.com/blog/2017/08/5-umbraco-seo-packages-you-need-right-now

Umbraco URL issue with Vorto

I am using vorto plugin in my Umbraco 7 application to achieve the multilingual capability.
I mentioned the URL in hostname as 'localhost/clientname/en'.
Whenever I open login page the URL which is getting form is 'http://localhost/clientname/en/login'.
This is the structure of vorto URL writing.
But can I achieve it like 'http://localhost/clientname/login/en' ???
I want language names at the end of the URL, not in between.
Is it possible ?
Please help....i am badly stuck in my project task !
It sounds like you need a custom URL provider, setting the domain to 'localhost/clientname/en' will mean that the URLs will always get added AFTER the language part as the host is always the first part of the URL.
Have a look at this article on URL providers and content finders: https://24days.in/umbraco-cms/2014/urlprovider-and-contentfinder/ it's quite old, but it should still work. That should give you an idea of how to make it work. Basically you want the URL provider to append the language to the end of the URL, and the content finder to strip the language from the end and then find the actual content. You can also then set the language of the current thread in the content finder so that Vorto and Umbraco are using the correct language based on the URL.

AngularJs Routing | don't change URL

I am developing an App that uses the AngularJs Router.
So my URLs look like that:
appName/viewOrders
My problem is, when I refresh the browser with F5 I get an 404 Error. (Because there isn't a folder or even file named viewOrders)
I can't redirect it via a config file because I am not able to use one in the environment where I am developing (An Sharepoint 2013 App).
So I came to this idea:
When I click the navigation, the Url doesn't change and stays at
/appName
But the view does it.
How can I achieve it? Have I to use the ui-router?
If you have restricted access and are unable to use the answer #tommyd456 (which it sounds like that may be the case), another option is to omit the url completely using stateProvider (ui-router).
Angular ui-router: Can you change state without changing URL?
Not sure if you've solved this issue but here's a potential solution anyway...
You're using HTML5 mode so you need server-side rewrite as explained here: https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-configure-your-server-to-work-with-html5mode
However, it sounds like you've got restricted access to a server so why stop HTML5 mode.
Don't hack at it like you're suggesting - that could get nasty.

iis 7 url rewrite with preset paths

I'm trying to make something like this work in iis 7, or web config
request:
products.aspx?id=100
rewrite:
domain/products/mp3
Please note, I do not want redirection, for domain/products/mp3 is invalid path, I just want the url rewrite so the user sees this path but the server serves the actual request.
Can you help?
Can you use the URL Rewrite functionality from ASP.NET instead? That was built for that.
RouteTable.Routes.MapPageRoute("Test", "domain/products/{type}", "~/products.aspx");
Then in products.aspx you have to map from mp3 to 100 somehow, but I assume you have a db table for that anyway.

SEO friendly URLs with Delphi ISAPI

My customer wants me to get rid of the dll and ? & characters in the url and use SEO friendly urls.
How can I go about this URL - rewrite?
Currently I have something like:
http://www.ultimateholidayplanner.com/uhp.dll/AccList?PN=AccommodationSearch.htm
That needs to turn into something like:
http://www.ultimateholidayplanner.com/Accommodation/List.htm
Many thanks
Use II7 and download Microsoft URL rewrite module to change this behavior.
see Using URL Rewrite module
Regards
You don't need to change your code, you need just to use something like ISAPI_Rewrite
ISAPI extensions can be mapped to the extension ".*" creating a wildcard extension mapping, and so catching any and every request to the site/virtual-dir. (especially with 'check that file exists' unselected)
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true
(if it might interest you: I found out working on xxm)

Resources