PATH_INFO in vbscript ASP IIS - iis

I was wondering if somebody could guide me to configure my web server to do the following:
http://mywebsite.com/default.asp/PATH
Where Path would be retreive into a var.
My problem is the following:
When I call : http://mywebsite.com/default.asp/PATH
I get a 404 error, probably because IIS thinks that default.asp is a directory?
Anyway, any help would be greatly appreciated!

default.asp is a file. Files are always leaf objects in paths, so you can't have what you're asking for. What you can have is:
http://example.com/PATH/default.asp
or
http://example.com/default.asp?PATH
In the latter, PATH is a parameter passed to the ASP page default.asp.

Related

apache url completion suffix

a simple question. I've a file named xyz.php on the domain http://mybeautifulsite.com. Url is http://mybeautifulsite.com/xyz.php
When i type http://mybeautifulsite.com/xyz.php all is right good.
But if i type without php : http://mybeautifulsite.com/xyz I've a 404 error
What onfiguration is missing ?
Thank you
This is because of the way webservers work. without the .php the internet browser is assuming that xyz is a folder with an index.html. So its interpreting it as
http://mybeautifulsite.com/xyz/index.html

Cakephp3 strato installation

i want to write a little Cakephp3 application for a friend. Now i developed a part of the application locally and i want to install this on his server. He got a managed server at strato.de. I have no access to a shell or something like this to configure everything by myself.
What i did already to solve the problem:
I googled around and found several things about some definitions in the htaccess-files: .htaccess for cakephp but it didn't solve my problem.
I also read the installation-guide of cakephp.
The problem:
I can't access the application. If i try to open the url i only get a complete white page. So what do i have to do to access the application?
Thanks for help!
Put this lines in you root index.php file to show all errors
error_reporting(E_ALL);
ini_set("display_errors", "on");
(overhead this line)
require 'webroot' . DIRECTORY_SEPARATOR . 'index.php';
But I imagine a message like this...
Fatal error: You must enable the intl extension to use CakePHP in ... cakephp/config/bootstrap.php on line 38
I talked with Strato about it, but they didn't give me any solution for shared hostings...
If it's any info, I checked hostings strato and its support laravel5

getting 404 error accessing CFM page

I am trying to access a coldfusion file on Server.
The file with xyz.htm extension works fine where as when I convert the same html into coldfusion file, like xyz.cfm , it throws following error:
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
May I know what could be the reason?
Assuming CF8 on IIS6?
Could be that you've not correctly run the wsconfig.exe tool which will tie in CF to IIS etc.
Need to know which version of CF, which webserver/OS & versions to help further.
Basically, the webserver needs to know how to parse .cfm requests; without running the webserver connector tool, it won't know which files to use to actually deal with the .cfm files.

htaccess url destroyed results

I'm trying to fix some strange or destroyed results with my web url, if I add any char after index.php/:
http://domain/index.php/?
How can I fix this? Thank you!
This web server feature is called Path Info. Look for Apaches AcceptPathInfo settings. What's exactly your problem? Do you want to use ordinary query strings together with path info URLs?

How to move pages around and rename them while not breaking incoming links from external sites that still use the poorly formed URLs

update
Here is the situation:
I'm working on a website that has no physical folder structure. Nothing had been planned or controlled and there were about 4 consecutive webmasters.
Here is an example of an especially ugly directory
\new\new\pasite-new.asp
most pages are stored in a folder with the same name as the file, for maximum redundancy.
\New\10cap\pasite-10cap.asp
\QL\Address\PAsite-Address.asp
each of these [page directories]? (I don't know what else to call them) has an include folder, the include folder contains the same *.inc files in every case, just copied about 162 times for each page directory. The include folder was duplicated so that the
<!--#include file="urlstring"--> would work correctly due to lack of understanding of relative paths, and the #inclue virtual directive or using server.execute()
Here is a picture if my explanation was lacking.
Here are some of my limitations:
The site is written in ASP classic
Server is Windows Server 2003 R2 SP2 , IIS 6 (According to my resource)
I have no access to the IIS server
I would have to go through a process to add any modules or features to iis
What changes can I make that would allow me to move pages around and rename them while not breaking incoming links from external sites that still use the poorly formed URLs?
To make my question more specific.
How can I move the file 10cap.asp from \new\10cap\ to a better location like \ and rename the file to someting like saveourhomescap.asp and not break any incoming links and finally, not have to leave a dummy 10cap.asp page in the original location with a redirect to the new page.
Wow, that's a lot of limitations to deal with.
Can you setup a custom error page? If so you can add some code into a custom error page that would redirect users to the new page. So maybe you create a custom 404 page, and in that page you grab the query string variable and based on that send the user to the correct "new" page. That would allow you to delete all of the old pages.
Here is a pretty good article on this method: URL Rewriting for Classic ASP
Well, you have a lot of limitations and especially no access to the IIS server hurts. An ISAPI module for URL rewriting is not an option here (IIS) and equally a custom 404 page where you could read the referer and forward with a HTTP 301 won't work (IIS).
I would actually recommend you to go through the process and let them install:
An ISAPI URL rewriting module
or if that doesn't work (for any reason):
Let them point the HTTP 404 of your web to a custom 404.asp, read the referer and redirect with a HTTP 301 (Moved Permanently) to your new location.
If none of this is an option for you, I can think about another possibility. I haven't actually tried that so I'm not 100% sure if it will work, but in theory it sounds good ;)
You could make in your global.asa in the Session_OnStart event a Response.Redirect or change the header of your response to a HTTP 301. This will actually only work for new users and not fix real 404 errors. Sorry, for the pseudo code, but it's a while ago that I had anything to do with classic ASP and I think you'll get what I mean ;)
sub Session_OnStart
' here should be a Select Case switch or something like that
Response.Redirect("newlocation.asp")
' or if that will work, this would be better (again with switch)
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://company.com/newlocation.asp"
end sub
Hope that helps.
I recommend using URL Rewrite for that, see the following blog about it, in particular "Site Reorganization":
http://blogs.msdn.com/b/carlosag/archive/2008/09/02/iis7urlrewriteseo.aspx
For more info about URL Rewrite see: http://www.iis.net/download/URLRewrite
You can try ISAPIRewrite since it's classic ASP + IIS6
http://www.isapirewrite.com/
They have a lite version which is free, probably good enough for your use.
urlrewrite will only work if you can install a dll on the server
one of these articles will help
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=qRR&q=url+rewrite+classic+asp&btnG=Search&aq=f&oq=&aqi=g-m1
basically you have to point 404 errors to an error page which will parse the incoming querystring / post info and redirect user to correct location with incoming parameters added.
variations on that theme will be found in the examples fro google.

Resources