can mod rewrite do this?

Discussion in 'Apache' started by sharpweb, Dec 25, 2005.

  1. #1
    I have a bunch of websites and for years I've been user underscores to replace spaces in URLs....ie www . mywebsite.com/news_article.html

    I've recently heard some crazy rumors that using a dash instead is better for search engines....ie www . mywebsite.com/news-article.html

    So here's the mod rewrite I've come up with to do this:
    RewriteEngine on
    RewriteCond %{REQUEST_URI} ^(.*)-(.*)$
    RewriteRule ^(.*)-(.*)$  $1_$2 [N]
    Code (markup):
    Is that a good way to do it?

    Thanks.
     
    sharpweb, Dec 25, 2005 IP
  2. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #2
    Don't listen to crazy rumours. No difference at all between _ and -
     
    fryman, Dec 25, 2005 IP