The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other HTACCESS configure Reply To: HTACCESS configure


Much better!

RewriteCond: bad argument line '^page/([^-]*)$'

That’s a RewriteCond error (not a RewriteRule error). Are you sure you wrote RewriteRule? or perhaps some other typo?

But, more importantly, what do you want this rule to match? You’ve written “anything or nothing” ((.*)), “at least one letter, digit, and/or underscore” (([a-zA-Z0-9_-]+)), and now “anything (except a dash) or nothing” (([^-]*)).

In your original post, it seemed you wanted to simply use the id number in the URL, without a query string: i.e., /page/42 instead of /page/index.php?id=42. If that’s correct, then you need to match only digits.

Now, it seems you’ve changed your plan (you’re using page names instead of IDs?). So, what’s it to be? And do your scripts still need the ?id=nn form?