How to create an alias path on local IIS? - url

Unfortunately searching the web didn't make me any smarter. I have a web application running under my local IIS 7.5: http://localhost/myWebpage/
Now I'd like to create an alias path pointing to the same application, something like http://localhost/myWebpageAlias/ (the application will change it's layout according to the different address).
How can I achieve this?
Thx for any tipps
sl3dg3

Try creating a new virtual directory under "Default Web Site" (or whatever site is serving 'localhost'), then point it to the same directory:

Though it is the too late answer. But to alias path, you can use the IIS URL Rewrite module to create a rule which maps one URL to another. Visit here for details description.

Related

Zend Framework 2 index.php in root folder

I am bulding a website with zend framework 2 and a URL typically looks like this:
domain.com/public/routename/action/params
In the skeleton application i don't have index.php by default, so i created one what basically includes the index.php from the public folder.(This is absolutely not the correct solution). What works but slows down the whole website, also the redirect plugin still redirects to domain.com/public/routename/action/params insetad of domain.com/routename/action/params
How could i skip the "public" in the URLs and get the redirect plugin to work?
Either you can do this from webserver from where you can point the public folder index.php so either point the domain to zf2 you should point to zf2/public/index.php
Another way is you can use htaccess and remove the public url
You should configure your web server so that it serves from public instead of the ZF2 root folder.
Not sure if you use IIS or apache or NGiNX, so without those details it is hard to say what you need to do exactly. But it should be easy to find a 'how to' for your particular web server.
It comes down to configuring what folder should be server for that particular virtual host.
Google can help you

URL Routes In IIS7 MVC 5 (Single Paged Application)

After publishing a MVC5 web application of mine to my IIS server (Individual User Accounts), it would seem that the URL is accessed incorrectly.
During debug, it would be e.g http://localhost:1234/api/Account/UserInfo?=XXXXX
The debug works just fine. The only issue kicks in after I've published it via my IIS7 server.
After publishing and using Google Chrome's console, it would appear that the page is requesting for a resource at mydomainname.com/api/Account/UserInfo?=XXXX instead of mydomainname.com/WEBAPPLICATIONNAME/api/Account/UserInfo?=XXXX.
My best guess is to modify the URLs in /Scripts/app/app.datamodel.js but it would just cause more parsing problems.
I've searched around and can't seem to find any related problems. I hope someone here will be able to lend a hand.
Look like you are using relative path like "/api/Account/UserInfo". Instead i'll recommend you to use #Url.Content("/api/Account/UserInfo"). This will solve your problem
Explanation
In local system when we run application in WebDev server it never have sub folder (like WEBAPPLICATIONNAME) therefore you relative path work correctly. but when you host your application in IIS under Default website in another new website /Virtual folder (like 'WEBAPPLICATIONNAME') then "/api/Account/UserInfo" fall back to Default Website because for '/' in starting. #Url.Content or #Url.Action make sure to add virtual directory name, hence changing your path to "/WEBAPPLICATIONNAME/api/Account/UserInfo" in IIS.

IIS 6 .NET MVC web app deployment - need to achieve a specific URL structure

I need my local (testing) deployment to respond to a URL like
http://localhost/apps.mydomain.com/myappname
not
http://localhost/myappname
Long story as to why but I just need that to be the case.
I actually had this working for awhile but I can't remember how. I had to delete and add the site again and now can't figure out what combination of settings gave me the result.
How can I achieve that URL structure locally?
MORE INFO: I've created a website called "apps.mydomain.com". I then added an application under that site with the alias "myappname". This app can be invoked with URL
http://localhost/myappname
Why? What happened to "apps.mydomain.com"? When I add it...
http://localhost/apps.mydomain.com/myappname
I get a 404.
You can just create directories apps.mydomain.com and apps.mydomain.com\myappname under C:\inetpub\wwwroot.
Or, if you don't want to publish your application in wwwroot, you can create virtual directory in IIS.

Joomla Site URL

I have a website on a 1and1 server. I have 2 domains on the package; the default url somenumbers.websitehome.co.uk and my actual URL.
The problem is, Joomla quotes the somoenumbers.websitehome.co.uk in system e-mails instead of my actual URL. They both point to the same directory I just don't want to give a stupid URL to my users.
I think I have narrowed it down to the $siteUrl variable but I'm not sure how to go from here.
Thanks
James
At first I thought this sounded largely like a DNS issue - but then you said you only have 1 Joomla installation and both domains point to that directory.
If they're both pointing to the same directory, then both domains will display the same Joomla installation. That is, unless you're checking to see where they are coming from and having the content display dynamically based upon how they got to your site - but from your comments I doubt you're doing that. How your domains are behaving is the expected response if you're pointing them both to the same directory.
If you want 2 sites on the same hosting? Setup 2 databases (or apply different prefix for each site and use 1 database) and set up each website in it's own directory.
Adjust the DNS of each domain name (and subdomain name) to point the appropriate directory.
From there, use the .htaccess file and SEF URL's to get rid of any indicator of the directory so that it displays the same as if the site was in the root directory.
That is the best way to accomplish what you're after - because from the sounds of it Joomla is doing exactly as it should, displaying correctly what is in the directory since both domain names point to the same directory.
$siteUrl should be left blank.

How do I serve static files from mvc without using content folder?

I want to be able to have a folder which allows regular access like the \content folder except that it holds a ClickOnce application. I can't seem to be able to achieve this using Mvc, but I'd like to have this folder accessible without Mvc seeing it as a controller action.
I tried using routes.Ignore(theUrl), but this seemed to have no effect.
There are two ways you can do this. The first is where you are currently going, which is to satisfy it with routing. You should be able to use the following to ignore the intended route:
routes.IgnoreRoute("...")
However, this might not be the right approach from a security stand point. I would recommend you define an explicit action to download your click-once exe. Have a look at this q/a as an example of using the FileContentResult class.
The reason for this is that you can control security for that file without having to open up access levels to other directories.
Edit: If this is for an entire directory, you can still follow this same approach.
Set up the folder as a virtual folder in the website on IIS. then you can set the url in the code to point to the machine serving the request and to the virtual folder on the web server.

Resources