PDA

View Full Version : Some urls are not working on wordpress


dunand
06-25-2010, 03:43 PM
I have installed Wordpress on Tomcat in Linux using Quercus. Everything is working perfectly.

Now I'm trying to install the same war on Websphere in Windows. The URL on the public side of wordpress are not working.

For example :
www.mysite.com/php/?p=1#comments //this is not working this is like ?p=1#comments is ignored :(

But all the URLs under wp-admin are working correctly. I can make new post.

My web.xml contains :
<servlet-mapping>
<servlet-name>Quercus Servlet</servlet-name>
<url-pattern>*.php</url-pattern>
</servlet-mapping>


Do you have any clues ?

thanks

emil
06-25-2010, 05:41 PM
Hi,

Have you tried setting your welcome-file-list to include index.php?

Emil

dunand
06-25-2010, 06:07 PM
Yes index.php is in my welcome-file list.

<welcome-file-list>
<welcome-file>index.php</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

www.mysite.com/php/ bring me to the welcome page of wordpress (index.php).

emil
06-25-2010, 06:47 PM
Hi,

In that case, I'm left to suspect that it's WebSphere configuration issue. That kind of URL mapping issue is handled by the application server, so if Tomcat is serving it properly it may be that you need to change something in WebSphere.

Emil

dunand
06-25-2010, 07:00 PM
I'm norrowing the problem down.

I output the url at the beginning of index.php like this :
echo $_SERVER['REQUEST_URI'] ;

If I try to access :
http://localhost:9081/blogue/php/?p=1#comments
it shows only :
/blogue/php/

For some reason the rest of the request is discarted. It only happens with index.php

For example, if I do the same thing in a file called toto.php. And I output the url with echo $_SERVER['REQUEST_URI'] ; It will show the parameters:
http://localhost:9081/blogue/php/toto.php?p=test
is showing
/blogue/php/toto.php?p=test

why ?

emil
06-25-2010, 08:25 PM
Quercus is getting that information ($_SERVER['REQUEST_URI']) from the app server. I'm not sure how WebSphere is configured compared to Resin or Tomcat in these situations, but that's sounding increasingly like the issue.

Best,
Emil

domdorn
06-26-2010, 02:17 PM
there are some differences between the $_SERVER array quercus produces ( SCRIPT_NAME, REQUEST_URI, etc. ) and how the $_SERVER array looks like in a apache-php environment.

some applications rely on these elements for custom url parsing (especially when manual "url rewriting" is used like somehost.com/index.php/page/5 )

I've came across some of them and will provide test cases, so we can fix those issues.

dominik

dunand
07-19-2010, 03:51 PM
We solve our problem by applying a fix on Websphere. You need at least WebSphere 6.1.0.25. Anything under 6.1.0.25 will broke some url.

Look at this if you want more informations :

http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK78371