Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Quercus

Reply
 
Thread Tools Display Modes
  #1  
Old 10-10-2011, 05:49 PM
sinoea sinoea is offline
Junior Member
 
Join Date: Oct 2011
Posts: 4
Question Wordpress + Quercus + Pretty permalinks (SEO Friendly URLs)

Hi there,
I have installed wordpress as subfolder in my Java web app.
The subfolder is named "articles".

Almost everything works well, however I have only one problem.
I cannot get pretty permalinks working.
I keep getting a 404 error for all SEO friendly blog post URLs and
even the URL friendly pages and category pages.

For example www.mywebsite.co.uk/articles/test-article gives me a 404 error.
If I switch back to Default URL settings then it works (www.mywebsite.co.uk/articles/?p=1).

Please help, I need to get the SEO friendly URLs working!


Here is what I am using:
--------------------------------------------------------------------------
1. Apache2.2
2. Tomcat 5.5
3. MySQL 5.1.55
4. jdk1.6.0_24
5. Windows Server 2003
6. WordPress Version 3.2.1
7. Quercus 4.0.18




Virtual host added in the httpd.conf file
-------------------------------------------------------------------------

<VirtualHost *:80>
ServerName www.mywebsite.co.uk
ServerAdmin info@mywebsite.co.uk
LogLevel error
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.mywebsite\.co.uk
RewriteRule ^(.*)$ http://www.mywebsite.co.uk$1 [R=permanent,L]
JkMount /* ajp13
JkMount /*.jsp ajp13
JkMount /*.css ajp13
JkMount /*.jpg ajp13
JkMount /*.gif ajp13
JkMount /*.js ajp13
</VirtualHost>



.htaccess file created under the "articles" folder (the wordpress application)
-------------------------------------------------------------------------

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /articles/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /articles/index.php [L]
</IfModule>
# END WordPress


Quercus Servlet and Tuckey's UrlRewriteFilter declared in the web.xml
------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="mywebsite" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>mywebsite</display-name>

<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewrite Filter</filter-class>
<init-param>
<param-name>logLevel</param-name>
<param-value>WARN</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<servlet>
<servlet-name>Quercus Servlet</servlet-name>
<servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>

<!--
Specifies the encoding Quercus should use to read in PHP scripts.
-->
<!--
<init-param>
<param-name>script-encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
-->

<!--
Tells Quercus to use the following JDBC database and to ignore the
arguments of mysql_connect().
-->
<!--
<init-param>
<param-name>database</param-name>
<param-value>jdbc/test</param-value>
</init-param>
-->

<!--
<init-param>
<param-name>ini-file</param-name>
<param-value>WEB-INF/php.ini</param-value>
</init-param>
-->

<!--
Location of the license to enable php to java compilation.
-->
<init-param>
<param-name>license-directory</param-name>
<param-value>WEB-INF/licenses</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>Quercus Servlet</servlet-name>
<url-pattern>*.php</url-pattern>
</servlet-mapping>

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


-------------------------------------------------------------------------



Regards,
Sam
Reply With Quote
  #2  
Old 12-17-2013, 07:04 PM
iX3 iX3 is offline
Junior Member
 
Join Date: Dec 2013
Posts: 1
Default Did you find a solution?

Hi Sam,

I am in a similar situation: Wordpress seems to work fine in my Quercus instance but only until I change the permalink structure to a non-default (i.e. pretty) structure. Then I get 404 errors when I try to go to a page like /sample-post/

If you have found a solution I would love to hear about it. Thanks.
Reply With Quote
Reply

Tags
permalinks, quercus, tomcat, wordpress

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:53 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.