We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37044
    • 68 Posts
    I have what I believe should be a pretty straight forward mod_rewrite rule I want to create but for the life of me cant make it work...

    Im using Revo 220 an am using what I belive to be the standard / packaged htaccess file as below

    # Friendly URLs Part
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} .
    
    # Force all pages to go to www.domain.co.uk for SEO
    RewriteCond %{HTTP_HOST} !^www\.domain\.co.uk [NC]
    RewriteRule (.*) http://www.domain.co.uk/dev/$1 [R=301,L]
    #are your sure the above rule shouldn't be :
    #RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]
    
    # Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([^/]+)$ dev/index.php?q=$1 [L,QSA]


    What I want to do is on a specific page "company" is to add an additional query string "company_id"


    As mentioned I have tried a lot of iterations but the seemed to fail or conflict with the existing re_writes.

    I asked on Stack overflow as well but the only answer didn't work either - http://stackoverflow.com/questions/9691378/mod-rewrite-additional-query-string-correct-syntax

    Any help much appreciated!! [ed. note: megasteve4 last edited this post 14 years, 7 months ago.]