URL Rewriting rules for News categories (etc)?

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
martin42
Forum Members
Forum Members
Posts: 126
Joined: Sat Aug 20, 2005 11:35 pm

URL Rewriting rules for News categories (etc)?

Post 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
Locked

Return to “[locked] Installation, Setup and Upgrade”