RewriteRule not working with Apache version?

Discussion in 'Apache' started by adrianus, Mar 16, 2011.

  1. #1
    I have been struggling for a while with trying to get a simple rewrite rule to go from ugly url's to pretty url's to work. In the end I had to conclude it has something to do with my environment, since the same .htaccess file did the job fine on another domain with another hoster. The rule is the following:

    RewriteRule ^prettyurls/(.*)/?$ prettyurls.php?para1=$1 [L]

    In my opinion this should work and indeed works fine on one domain. On another domain this will load the webpage, but will have not recoginzed the parameter, so If I would type:

    http://mywebsite/prettyurls/12

    12 will not be shown as the value of para1.

    The problem seems to be that "prettyurls" is used in both the pattern and the destination. If I change the pattern url, everything will work fine again.

    Is this a familiar problem and is there a workaround, since I am not sure my webhoster wil change the installations?
     
    adrianus, Mar 16, 2011 IP