Web Development - Redirecting Old Asp Files To New Aspx Files (Permanent Redirect, SEO)
Jun 28, 2010
I upgraded my site from asp to asp.net.This means that all of my previous asp files became obsolete.I don't want to lose my Google Ranking of the old pages.
What is the proper way to redirect?I tried to catch all of the old asp pages is my 404 and then to:
if Request.QueryString("aspxerrorpath").contains("index.asp") = true then
Response.Status = "301 Moved Permanently"
Response.AddHeader("Location", "http://www.domain.com/index.aspx")
Response.Redirect("/index.aspx")
end if
but it doesn't catch asp pages, only aspx.
View 3 Replies
Similar Messages:
Jan 12, 2011
Our old ASP.net site stored static images in a sub directory on the root called /images.
Our new ASP.net MVC site stores these images in the new layout of /Content/Images
I've changed all the pages in the site to cope with the new folder structure, but I'd like to set up Permanent Redirects from the old static images to the new location.
View 1 Replies
Apr 15, 2010
I've inherited a bunch of code that has server script inside of .htm files.
On IIS, a handler mapping pumps.Htm pages though the asp.net engine.
Unfortunately, visual studio doesn't notice that they should be treated as code.
Is there any way to make VS treat .Htm files as code/aspx files?
View 3 Replies
Nov 9, 2010
I have a designer working on several pages in Dreamweaver. The designer is creating .aspx files with the Page directive at the top. These are getting shipped to me and I'm adding them to the Visual Studio ASP.NET WebForms Web Application Project. The problem is that there's no code-behind file by default, and I'm trying to find a shortcut to have them autogenerated as if I've added a fresh page from Visual Studio.
View 3 Replies
Jan 11, 2011
I recently migrated my site from a aspx site to wordpress. The wp site is now hosted on rackspace cloud.
When I go to index.aspx I get the following message:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. etc.
Previous times I have done a migration like this I uploaded a file index.aspx with a redirection inside and that worked well, but now it doesn't seem to find the file at all.
Nor did a redirect from the htaccess, nor the redirection plugin. I just get that same message.
View 2 Replies
Feb 24, 2011
is it possible to open aspx files directly by clicking on them like html files without from within visual studio or visual web dev?
View 2 Replies
Dec 30, 2010
On a membership website that every user has an acount how to give a user place or page in the way below: assume that website is [URL] then we have a user with acount Jimmy now I want to have a link like : [URL] that gives general information about jimmy to other users. one solution is to make a sub directory on root named jimmy and have an index.aspx file in that. it is space consuming and I do not want to do it. Is there any other briliant solution for this problem that for example I can use just one page and take jimmy as query string or something like that to show jimmy's information?
View 1 Replies
Jan 21, 2011
how to make 301 permanent redirect in asp.net?
I have written code in Global.asax file but my web client says it is not working,
i have written follwing code in Global.asax file:
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (HttpContext.Current.Request.Url.ToString().ToLower().Contains(
"http://lsatfreedom.com"))
{
HttpContext.Current.Response.Status =
"301 Moved Permanently";
HttpContext.Current.Response.AddHeader("Location",
Request.Url.ToString().ToLower().Replace(
"http://lsatfreedom.com",
"http://www.lsatfreedom.com"));
}
}
View 4 Replies
Jul 8, 2010
I am doing a 301 permanent redirect from an old server to a new server. When the new server's page is hit I want to be able to determine whether the user comes from the old site and then react differently, i.e. instruct user to re-book mark the new page.
View 2 Replies
Jul 7, 2010
When I attempt to test my new report on my workstation in Visual Studio 2010 running the beta Crystal Reports for 2010 it can not find the folder containing the required files.
Is there a way to force it to find them so I can debug the code calling the report?
View 3 Replies
Jul 22, 2010
I moved some of my old asp pages to new aspx website. In all of the old pages i used (for file example.asp):
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.domain.com/example.aspx");
The problem is that when the page domain.com/example.asp?param=value¶m2=value2 is requested - the redirect ain't working...
View 1 Replies
Feb 28, 2011
If we are deploying ASP.NET web application, Do we need to copy both *.aspx and *.aspx.cs files on the server?Also what if I am using different framework version? I mean 1.1 / 2.0 /3.0 /3.5 /4.0? What will be the answer in different .NET Framework versions?
View 5 Replies
Jul 1, 2010
I need to change the encoding from Western European... to Unicode... for every file in the project. I do not want to have to check out, open, change encoding, save and check-in every file, is there a faster way?
VS2008 + TFS 2008
View 2 Replies
Aug 18, 2010
I would like to reorganize the directory structure on a hosted website (i.e. I can not go in and configure the IIS settings).
Say I had 3 files in the root directory:
fruitcake.html,
chocolateCake.html, and
appleMuffins.html
Now, I want to move them to a new folder called Recipes. This is easy enough, but there are a lot of existing links out there that point to the other files. How would I construct a 404.aspx page to read in which file was in the address bar, then update the browser to go to the new location?
View 1 Replies
Jul 13, 2010
I want to know how can I load my files (file1.aspx and file1.aspx.vb) in a container on my index.aspx. My index should have my menu and my container. My problem is that i don't know how do that... options wich i tried:
Iframes: yes work it... but in html 5 iframe will dissapear...
MasterPage: isn't the solution because this refresh all index page.
Ajax: yes.. charge my File1.aspx in the container but i can't call the functions of File1.aspx.vb...
View 2 Replies
Mar 22, 2010
Our old site is in Classic ASP, and we know there are many people who have pages bookmarked. The new pages will be written in .Net.I thought of url rewriting (overkill?), but I'm not sure how to set that up (if this is the best way, I'll need some links to tutorials for using it in this specific manner. I've seen it used by never done it myself)What is the best, most efficient way setup some permanent redirects for these .asp to aspx pages?
View 1 Replies
Feb 1, 2010
In my project I have both the vb(.aspx.vb) and c#(.aspx.cs) files. Can i run both the files in my single application? or how to run?
View 3 Replies
Feb 24, 2011
I manage a large asp.net site which has previously been converted from static html site to asp.net. For several reasons (mainly SEO) we decided not to rename all the files to .aspx back when we originally converted the site. This was very easy to do by simply adding the buildProvider and httpHandler to the web.config.
<buildProviders>
<add extension=".html" type="System.Web.Compilation.PageBuildProvider"/>
</buildProviders>
<httpHandlers>
<add path="*.html" verb="*" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
Now I am upgrading the site to use Asp.net WebPages with Razor cshtml files. I can rename all the files if necessary, and use url rewriting to make the urls stay the same, however it would be much easier if I could just configure the web.config to tell it to parse .html files as if they were .cshtml. I have searched around quite a bit, and could not find anything equivalent to the PageHandlerFactory for razor pages. It appears as though it is just an internal mechanism in the .net 4.0 ISAPI handler.
The site is currently running on Windows 2003 server and IIS 6. We will be upgrading to 2008/IIS 7.5 in the near future, but I'd prefer not to wait for that. Is there any way to get the .html files to be parsed by razor as if they were .cshtml files?
View 2 Replies
May 6, 2010
I basically want to do a reverse 'search in all files', so it returns files that don't contain "keyword".Does anyone know how to do this, or the regex used, etc?
View 1 Replies
Oct 13, 2010
I have an application that uses resource files to display items in multiple languages. My app uses quote a lot of javascript and the alerts need to display in the local language. To do this, I have created an http handler which will read the keys and values of the culture-specific resource file and write them to a JSON array which is then embedded in the page in a script tag, the messages can then be accesses using, for exmaple:
Message.Error (en-GB = "Error", fr-FR = "Erreur")
The messages http handler works great in development, however when I run the application on a test server, I get the error: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resources.Alerts.resources" was correctly embedded or linked into assembly "App_GlobalResources.b0n9j90e" at compile time, or that all the satellite assemblies required are loadable and fully signed. The code that I use to acccess the resource file is:
ResourceManager manager = Resources.Alerts.ResourceManager;
ResourceSet resourceSet= Resources.Alerts.ResourceManager.GetResourceSet(Thread.CurrentThread.CurrentCulture, true, true);
Where Resources.Alerts is the type that contains my multi-lingual definitions. The build action for the Alerts.resx file is set to "Embedded Resource". Any ideas why this works locally but not on my test server, am I missing something?
View 1 Replies
Jul 1, 2010
I was following the tutorials from this two sites:
http://www.15seconds.com/issue/070104.htm
http://aspnet.4guysfromrolla.com/articles/020404-1.aspx
Following the first site, it had worked but when I´ve moved the pages and files to other folders and set the web.config file on this folder, now it won´t work at all!!!
The file is an *.swf object. I did put the asapi.dll to map the extension on the website root, I´ve put the
[Code]....
on the web.config new folder and on the web.config website´s root.
It won´t work!!! I can access the file directly!!! on the web.config of the folder that contains the file, there is a <deny users="*" /> line.
View 4 Replies
Nov 12, 2010
I am not sure this is the forums but I dont know where to write this and this is an EMERGENCY ::I had windows 2003 server. on C: and I have installed windows 2008 server.I had SQL server installed and all of the database files stored inside c:program filessql server....PROBLEM is that after I installed 2008 server I can see 2 folders of program files one for x86 and the other for 64 bits.
View 2 Replies
Dec 24, 2010
I have a form with 10 file inputs. They can contain 10 random files with random sizes. If I send these files to ASP.NET server with this code:
var count = HttpContext.Current.Request.Files.Count;
var TotalSize = 0;
for (int i = 0; i < count; i++ )
{
HttpPostedFile postedFile = HttpContext.Current.Request.Files.Get(i);
TotalSize += postedFile.ContentLength;
}
And as you can see I didn't save the files on the server, will this code just calculate the summary of files without need to receive the whole file from the client (And therefore it would be very fast)?
View 1 Replies
Jun 5, 2010
i have a production server that does not have ftp access. Possible way to deploy files is connecting with remote desktop client and send files.
As you know this approach is highly hard and time inefficient.
View 4 Replies
Aug 26, 2010
I am trying to open different types of files that I have uploaded on my sql server database. I would like to display all the list of files in Gridview. When user click the link it should open download dialog box and should be able to open its particular applications such as word, excel, browsers etc.
View 3 Replies