Hosting a static ruby site on heroku, and adding pages - ruby-on-rails

I have just finished following this tutorial on Heroku's website:
https://devcenter.heroku.com/articles/static-sites-ruby
Everything works fine and I can access my index.html file and all images, css and js when I run my local server.
The question I have is: How do I add another page? Right now, only the index.html page works as the root, but I have one other page called /faq.html (also in my public folder).
When I try and access it through the navbar on the website (on my running local server), it just reloads the root url again. How can I root to this page?
Thanks for the help

Related

MVC app static files are not accessible when deployed in virtual folder

I have a Windows Server 2012R2 running IIS version 8.5.9
Currently it has a single ASP.net Forms web application running on the default http port 80.
The website has an application pool (v4.0 Classic).
The website files are stored in c:\inetpub\wwwroot\formsApp.
( The application can be accessed in a way similar to: http://server-host-name.company.com )
This works fine, with no issues.
I created a new ASP.Net MVC application and published it to c:\inetpub\wwwroot\mvcApp.
I also created a dedicated pool (v4.0 Integrated) and configured it to run on port 8080.
The application works perfectly when I visit: http://server-host-name.company.com:8080.
Now, I created a virtual folder in the formsApp website in IIS and pointed it at mvcApp folder.
I also made sure that the pool used for the virtual folder is the Integrated pool, not the classic. The virtual folder name is mvc.
I could tell that IIS did something special to that folder, since its thumbnail icon is no longer a normal folder, but an application website thumbnail.
Now when I go to http://server-host-name.company.com/mvc I can see the page being loaded and the correct controller is called, the view is rendered, but the static script and CSS files are not loaded. When I examined the network log in the browser, I noticed that any request to the script or CSS static content is redirected to the Login Page, since the MVC app has Forms Authentication.
I have looked everywhere how to resolve this issue. Some answers pointed out that I should add a line in Web.config to add the line
<modules runAllManagedModulesForAllRequests="false" />
But that did not work. it had no effect, as the same page loaded without CSS or JS. But besides the fact that it worked or not, it does not explain why the app worked fine when IIS served it off of port 8080, without having that line included in Web.config.
Edit: Just to clarify, after the app runs from the virtual directory, the links/urls to the static files are valid with the name mvc prepended to them as expected.
How can I resolve this issue?

How to properly work with wamp locally?

I was working on my new project using wamp. Everything was fine until I uploaded the files to my real server (hostgator), where I already have another website hosted. I put the files of my new project in a subfolder so that it could work like a test environment. After that, whenever I try to open the home page of my new project in wamp I'm redirected to the page in my real webserver. I only want to work locally. What can I do to fix it? All I want is to use wamp locally to continue developing the new website.

No root page found in Contao CMS

I have a web application that is running smoothly on remote server. But for enhancements, I have to run the application in local server. But when I try to load the front end preview of the application, It says 'No root page found'.
Have you checked if the domain name in the site root page is empty or is corresponding with the live domain?
Other possibility is activating the language fallback checkbox on the site root page.
Can you post your warning messages or screenshots ?
I met this situations like this before, because Contao is running in maintenance mode .
So i put this line on localconfig.php
$GLOBALS['TL_CONFIG']['maintenanceMode'] = false;
And it runs.

Problems deploying MVC 4 application to website already hosting classic ASP

I am in the introductory steps of teaching myself ASP.Net MVC 4 with the intent of converting old Classic ASP code. So, I have made a simple Hello World application in MVC4 and want to deploy it to our development server. The development server currently mirrors our production environment. The production environment hosts a bevy of Classic ASP pages, hosted in the "web" directory.
I have used the publish button in VS to upload the hello world page to the dev server, dropping it into the "web" directory. So, within the "web" directory, there are 2 new folders /bin and /Views. The actual page I created resides within the /Views/Home directory.
After the code was uploaded I pulled up IE and attempted to view the hello world page by navigating to localhost/views/home/index.cshtml and I received a 404 error.
I then pulled up the directory listing in IIS and navigated down to the "home" directory. I right-clicked this folder and selected "convert to application".
At this point I was able to see my hello world page by directing IE to the root localhost. However, after removing the "home" directory from the application list (essentially undoing the "convert to application"), the hello world page still shows when I pull up the root directory in IE. I've checked the default pages list in IIS, and my Classic ASP homepage still lists as the first selection.
So, I'm kinda confused on how to make MVC and classic asp play nicely together. First and foremost, I'd like to get my dev server pointing back to it's original default page so that it matches the production environment.
Create a separated directory for your MVC4 application beside the web directory. After this create a new web application inside the IIS console and point the source directory to your new application directory (set the new application's AppPool to integrated). Everything should work fine.

asp.net mvc - site works fine locally but not after deployment

i have an asp.net mvc website. http:/mywebsite.com (just for this example)
I have been testing this asp.net mvc website locally on my machine and everything works fine on my local machine during testing. When i deploy to my web server
when i bring up http://mywebsite.com it goes to HomeController and load the view Views/Home/Index.aspx (which is perfect). So the main default page is fine.
The issue is, if i click any other other links (again that all seem to work fine locally) i get the following error:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Please try the following:
* Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
* If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted.
* Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
some examples would be:
http:/mywebsite.com\Photos
http:/mywebsite.com\Links
there definitely are controllers and views setup for this (or it wouldn't work locally).
does anyone have any idea how this might work fine locally but somehow on the webserver it doesn't
Are you running the site on II7 in integrated mode? If not, you need to add a wildcard handler so that all URLs get mapped to your application. See Phil Haack's blog post on running ASP.NET MVC ON IIS 6.
Something else to watch out for. I had a static website - deployed on IIS 7.5. Added some MVC Controllers to handle some simple server side apps and then re-deployed it. I didn't copy the web.config file, because I wrongly assumed that everything that was needed was in the one that was automatically created by the server.
You must copy the web.config up as well.

Resources