Hi,
I just need to have the a small CMS-like controller. The easiest way would be something like this:
public class HomeController : Controller {
public ActionResult View(string name) {
if (!ViewExists(name))
return new HttpNotFoundResult();
return View(name);
}
private bool ViewExists(string na...
Some background:
I setup six blogs this week, all using Wordpress 2.92, installed with Fantastico on a baby croc plan with Hostgator.
I used the same theme (heatmap 2.5.4) and plugins for each blog.
They were all up and running, no issues at all.
I go to create a new blog this morning, using the same setup, and when I try to change t...
I would like to allow users to access images saved in web folder.
For example - I have an image in web root folder "blank.png". But the link http://localhost:8080/myapp/blank.png returns 404 (not found).
Adding type to resteasy.media.type.mappings does not work.
I am a bit of a newbie in RESTEasy...
...
Hi,
First of all, quickly what exactly I want to achieve: translate particular exception into the HTTP 404 so the ASP.NET can handle it further.
I am handling exceptions in the ASP.NET (MVC2) this way:
protected void Application_Error(object sender, EventArgs e) {
var err = Server.GetLastError();
if (err == null)
...
How can I make a 404 php page with the 404'd file name in the link, example would be:
http://website.com/WrongPageName.html
would go to
http://website.com/404.php?page=WrongPageName.html
...
I'm trying to get the generic views for a date-based archive working in django.
I defined the urls as described in a tutorial, but django returns a 404 error whenever I want to access an url with a variable (such as month or year) in it. It don't even produces a TemplateDoesNotExist-execption. Normal urls without variables work fine.
He...
I'm working with an intranet system that, on each page, checks the user's cookie, verifies that they can see the current page based on database permissions, and records a page hit that includes their id and the page URL.
I just noticed that in the pagehits table, I see an entry for 404.php (my custom 404 page specified in the Apache con...
I have a php web page that now uses custom error pages when a page is not found. The custom error pages are included in PHP.
So when somebody types in an URL that does not exists I just include an error page, and the error page starts with:
<?php header("HTTP/1.1 404 Not> Found"); ?>
This also tells crawlers that the page does not ex...
I am new to python and I am super excited to learn. I am building my first app on app engin and I am not totally understanding why my yaml file is not resolving to the url that I set up.
here is the code
handlers:
- url: .*
script: main.py
- url: /letmein/.*
script: letmein.py
so if I go to http://localhost:8080/letmein/ I get ...
I've recently started logging my errors through codeIgniter. Since doing so, I have noticed a lot of 404 errors for directories that don't exist. For example:
ERROR - 2010-05-15 21:06:26 --> 404 Page Not Found --> someController/images
Where someController is, obviously, a controller. The problem is, there are no functions within that ...
Hi,
Apologies if SO is not the right place for this, but there are 700+ other SEO questions on here.
I'm a senior developer for a travel site with 12k+ pages. We completely redeveloped the site and relaunched in January, and with the volatile nature of travel, there are many pages which are no longer on the site. Examples:
/destinatio...
I have setup a custom 404 page custom404.aspx that returns a "404 Not Found" error correctly, however the non-existant page that was initially requested returns a "302 Found" status.
So when I test thispagedoesnotexist.aspx, it returns a "302 Found" then the custom404.aspx loads and returns a "404 Not Found" status.
I want to make sure...
I have converted a php to asp.net mvc and have it hosted with the Rackspace cloud. All works great apart from some php links are still linked from other sites and within search engines. My question is what do I need to add to my web.config to force php sites to go through the .net engine?
These links work as expected as I can catch the ...
I need a funny idea/inspiration for my 404 pages it can be a picture or funny dialog.
...
How can I make my client treat 404 Error correctly?
Right now it catches a general exception...
My WCF Server uses
WebOperationContext.Current.OutgoingResponse.SetStatusAsNotFound();
To return a 404 Error code
however my WCF client interperts it as an EndPointNotFoundException
There was no endpoint listening at http://myUrl that cou...
If you do script src="/path/to/nonexistent/file.js" in an HTML file and call that in a browser, and there are no dependencies or resources anywhere else in the HTML file that expect the file or code therein to actually exist, is there anything inherently bad-practice about doing this?
Yes, it is an odd question. The rationale is the dev...
I have SWFUpload version 2.2.0 installed on my server. I have yet to get it to work correctly. I am also using the jQuery plugin for it (http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/). My problem is that it will work properly until I give it a real file's URL. It works when the server serves the 404 code, but even when...
I'm setting up nginx with multiple domain or wildcard support for convenience sake, rather than setting up 50+ different sites-available/* files. Hopefully this is enough to show you what I'm trying to do. Some are static sites, some are dynamic with usually wordpress installed.
If an index.php exists, everything works as expected.
I...
I work with code written by other people, occasionally I am left somewhat confused and at these times Stack Overflow saves me. Please, save me again.
Our site allows people to upload images and later embed them within text in our site like so:
<img src="http://site.com/image_script.php?p=some_image_identifier"/>
My question is:
I...
I have the following code in the urls.py in mysite project.
/mysite/urls.py
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^gallery/$', include('mysite.gallery.urls')),
)
This results in a 404 page when I try to access a url set in gallery/urls.py.
/mysite/gallery/urls.py
from django.conf.urls.defaults im...