Forums

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

Home Forums Other Help with htaccess rewrite not liking dashes

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #46484
    Harris Christiansen
    Participant

    I use the following rewrite rule to behind the scenes rewrite addresses such as /pageName and /pageName/ to index.php?page=pageName. It works perfectly except when the pageName contains a -.

    RewriteEngine On
    RewriteRule ^(w+)$ /index.php?page=$1
    RewriteRule ^(w+)/$ /index.php?page=$1

    How can I get these rewrite rules to accept any input (or at least input containing A-Z, 1-9, and -‘s.

    Thank you.

Viewing 1 post (of 1 total)
  • The forum ‘Other’ is closed to new topics and replies.