IIS 7 - CodeIgniter Application name error 404 if not in correct case - codeigniter

I host my CodeIgniter website under IIS 7 with application name NewApp. So the URL can be reach on URL "my-domain.com/NewApp". The landing page can be access through "my-domain.com/newapp" link. But when I tried to access the other page like "my-domain.com/NewApp/Module" using "my-domain.com/newapp/Module" URL format, it gave me 404 error.
I have tried to un-tick the "ignore case" under "URL Rewrite" section but it makes "my-domain.com/newapp/Module" accessible and "my-domain.com/NewApp/Module" error 404.
Here is the setting that I applied on the IIS "URL Rewrite" section
Update Aug 12, 2015
The working application name is depend on what URL that we accessed after IIS Application Pool recycle period. So if I access "newapp" after the recycle period, we cannot access "NewApp". The same behaviour also applied when I access "NewApp" at the first time.
I found out that if I call codeigniter function $this->uri->uri_string() on "newapp" (assume I run "NewApp" after recycle period) the string that returned by the function is "NewApp/Controller/Function". And if I call the same function on "NewApp" it will returned "Controller/Function"
The temporary solution is to modify the router core class to make the function return the same output string.
Is there anyone know what to do in IIS so I don't use this temporary solution?

Related

NeoLoad Login 500 Error: Adf_Faces-30200

I'm trying to test java web application (jsf) that uses oracle adf-faces. When I record my test, the application is working fine but when I later check the user, then on login.jsf page, just before authentication and home pages, I get 500 Internal server error that says:
ADF_FACES-30200:For more information, please see the server's error log for an entry beginning with: The UIViewRoot is null. Fatal exception during PhaseId: RESTORE_VIEW 1.
Some more info: My login.jsf page is referred by previous login page that has jsession id appended to it. However, as far as I understand, neoload automatically handles jsessionid (I did try to set a parameter for it though and it didn't fix the error)
Also login.jsf page itself is a referrer to authentication page that in its turn is a referrer to a home page of an application, and the latter are both redirect pages (do not use manual definition) so they are not played during the check because of this error:
login.jsf page uses POST method and it has the following POST parameters: pt1:username, pt1:password, org.apache.myfaces.trinidad.faces.FORM, Adf-Window-Id, javax.faces.ViewState, Adf-Page-Id, oracle.adf.view.rich.DELTAS, event, event.pt1:loginCommandButton
I use set of users (I have a variable for username and password) and I handle javax.faces.ViewState manually with a jsf parameter (it used to give me errors).
I would appreciate any help greatly!

ARR and url rewrite to route to localhost app in IIS webserver

I have used ARR and URL rewrite to reverse proxy request from the internet to my local host MVC web app.
The weird thing is some parts of the web app works while others show 404 err:
1) When I type in : mywebsite/Nodewebsite/ - that works
2) When I type in : mywebsite/Nodewebsite/blog - that works
3) When I type in : mywebsite/Nodewebsite/admin - I get my admin page fine but when I try to log on I get a 404 err.
4) When I click on a link on lets say : mywebsite/Nodewebsite/blog that points to another page in my web app, I get a 404 err.
I checked the URL, the path is not right in the 404 err, it points to a location in my web root folder.
It seems whenever I try to access the web app from the internet by typing in a specific URL, it will work but if something redirect to a site it gives a 404 err.

IIIS 7.5 URL rewrite to Geoserver giving Connection Reset error

I have Geoserver set up on a Windows 2008 server using Jetty as the web container on port 8080. If the browse to http://[servername]:8080/geoserver/www/test/test.html I get a html page returned as expected.
Then I have set up IIS 7.5 using ARR and URL rewrite at the application pool level, to set up a reserve proxy. So that http://[servername]/geoserver.. is rewritten to http://[servername]:8080/geoserver... I am using match '.*' for the url and 'geoserver/' for the condition.
This gives a error when browsed to of 'connection reset' IIS http error log (C:\Windows\System32\LogFiles\HTTPERR) shows 'Connection_Dropped DefaultAppPool'
If I change the url rewrite to an action of redirect, the html page is displayed as expect, but obviously the url shows as redirected to port 8080.
Solved this by changing the URL rewrite to use .* for the URL match condition.

tomcat+josso1.8.6+spring

I use JOSSO 1.8.6. I configure all in the Tomcat lib directory file related to JOSSO, and I'm also doing all configuration in web application[spring] WEB-INF file. I got the below URL.
http://localhost:8080/TestLogin/?josso_cmd=login_optional
&josso_back_to=http://localhost:8080/TestLoginDemo/josso_security_check
&josso_partnerapp_id=TestLoginDemo
But my question is:
My parent web application is --TestLogin means this application login page is main to display all the other web application [child web application].
I have 3 child application
TestLoginDemo
jossoLogin1
JossoLoginDemo
All are spring application.
I hit in browser mean URL is http://localhost:8080/TestLoginDemo
So the below URL I see
http://localhost:8080/TestLogin/?josso_cmd=login_optional
&josso_back_to=http://localhost:8080/TestLoginDemo/josso_security_check
&josso_partnerapp_id=TestLoginDemo
But after the successful login I find the TestLogin flow means not transfer to the TestLoginDemo.
So what is the way if I have to carry on flow for TestLoginDemo?
And; after success this URL:
http://localhost:8080/TestLogin/?josso_cmd=login_optional
&josso_back_to=http://localhost:8080/TestLoginDemo/josso_security_check
&josso_partnerapp_id=TestLoginDemo
login page I got below URL in success:
http://localhost:8080/TestLogin/login.htm
instead of the below correct URL:
http://localhost:8080/TestLoginDemo/login.htm
Could anybody guide me on how to achieve this?
Why josso_cmd=login_optional, did you set it up like this ? By default this is unecessary to specify the josso_cmd argument.
In order to get back to the original application, you have to use josso_partnerapp_ctx argument (don't forget to encode URL), this will be passed to the security check page that will lead you to this page if the security check is sucessfull
Usually, URL looks like this:
https://login.domain.com/josso/signon/login.do?josso_back_to=https://site.domain.com/Josso/Check&josso_partnerapp_host=site.domain.com&josso_partnerapp_ctx=https%3a%2f%2site.domain.com%2fhome.html

How can I rewrite URLs in the Zeus web server for Mobile useragent?

I need to redirect anyone with a mobile user agent to a file called mobile.php.
My web hosting provider, Net Registry uses the Zeus web server.
Here's the script I've written from my research
RULE_1_START:
# get the document root
map path into SCRATCH:DOCROOT from /
match IN:User-Agent into $ with iPad|iPod|iPhone|Android|s+Mobile
if matched then
set OUT:Location = /mobile.php
endif
RULE_1_END:
I used the instructions on my host's site.
I pasted that into their console and it has worked to do redirects. Net registry have some odd console thing that you submit and it takes 10 minutes to update the zeus server config (annoying as hell).
Anyway my issue is that it redirects me to the wrong location:
So if you visit the site, with a user agent string that contains ipad|ipod|android|\s+mobile then you will trigger it ()
It takes me here:
http://example.com.au/mobile.php,%20catalog/index.php
I can't work out how to fix that, or why that happens because at the moment this file exists:
http://example.com.au/mobile.php
as does this one:
http://example.com.au/index.php. Contents of this file are:
<?php header("Location: catalog/index.php");
Any ideas on how I can make this work more like an apache .htaccess url Rewrite?
the official Zeus documentation
Fixed it by changing
set OUT:Location = /mobile.php
to
set URL = /mobile.php
From the manual...
Using Request Rewrite Scripts
To use the request rewriting functionality, create a script in the Zeus Request
Rewrite Scripting Language. The script contains instructions telling the
Virtual Server how to change the URL or headers of requests that match specified criteria.
The Virtual Server compiles the script, and (if the rewrite functionality is
enabled) uses it every time it receives a request. It runs the commands in the
script, changing the URL if it matches the specified criteria. Once the script is
finished, the Virtual Server continues processing the resulting URL.Zeus Web Server 4.3 User Guide
142 Configuring URL Handling
When changing the URL, the rewrite functionality can only change the local
part of it, that is, the part of the URL after the host name. For example, if a
user requests http://www.myhost.com/sales/uk.html, the rewrite
functionality can only make changes to /sales/uk.html. This means that
you cannot use the rewrite functionality to change the request to refer to a
file on another Virtual Server.
For example, the following script illustrates how to change requests for any
HTML files in the /sales directory so that the user receives them from the
/newsales directory instead:
match URL into $ with ^/sales/(.).html
if matched set URL=/newsales/$1.html
The rewrite functionality can also change the HTTP headers that were received
with a request, and create new HTTP headers to be returned to the user. For
example, the following script changes the HTTP host header, so that a request
for www.mysite.com/subserver is redirected to the Subserver
www.subserver.mysite.com:
match URL into $ with ^/([^/]+)/(.)$
if matched then
set IN:Host = www.$1.mysite.com
set URL = /$2
endif

Resources