I am working on creating an instance of Mango Blog on an Ubuntu server using Apache 2 HTTPD and Tomcat 6 with Railo 3.1.2. I was able to tweak all the settings until I tried to implement URL rewriting for blog URLs.
I used a combination of Adam Tuttle and John Sieber to get rewriting rules. I have a site setup as follows:
{Webroot} /. Htaccess
RewriteEngine on RewriteBase / # archives rule must be located before page rule for paging to work correctly RewriteRule archives/(.*)$ archives.cfm/$1 [PT,L,NC] RewriteRule page/(.*)$ page.cfm/$1 [PT,L,NC] RewriteRule post/(.*)$ post.cfm/$1 [PT,L,NC] RewriteRule author/(.*)$ author.cfm/$1 [PT,L,NC]
{apache home} / support sites / site_name
<VirtualHost *:80> ServerAdmin ******* DocumentRoot /var/www/******/www ServerName mango.*****.com DirectoryIndex index.cfm <Directory /var/www/*******.com/www/> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error-*******_com.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access-********_com.log combined ProxyPreserveHost Off ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://********.com:8009/ </VirtualHost>
When I visit blog entries by going to / post / hello -world on the site, I get 404 error. If I go to /post.cfm/hello-world, the message will appear just fine. I tried rewrite rules with rewrite tester , and said rewrite should work fine. I am very new to transcribing, so I apologize if this is something simple.
Dave long
source share