Page 1 of 1

URL Rewriting rules for News categories (etc)?

Posted: Mon Feb 21, 2011 9:27 am
by martin42
Hi,

I'm running CMSMS 1.9.3 with the sample site content, with Apache2 on Ubuntu Server 10.0.4 LTS.

Basic URL rewrites are working nicely on most of the sample content. But the link on the front page to the "General" News category still displays as
http://testing.example.co.uk/index.php? ... urnid=news

Is there a more comprehensive URL rewriting ruleset that will make prettier URLs for that type of page?

What I've done so far:-

- Enable mod_rewrite: sudo a2enmod rewrite

- Add contents of CMS doc/htaccess.txt to /etc/apache2/sites-available/testing.example.co.uk - in particular:-

Code: Select all

        <Directory /usr/local/www/testing.example.co.uk>
                Options FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
...
                <IfModule mod_rewrite.c>
                RewriteEngine on
                #
                #Sub-dir e.g: /cmsms
                RewriteBase /

                # Rewrites urls in the form of /parent/child/
                # but only rewrites if the requested URL is not a file or directory
                #
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.+)$ index.php?page=$1 [QSA]
                </IfModule>
...
        </Directory>
Thanks for any pointers!

- Martin