how to use url rewrite, change url from
http://www.mydomain.com/this-is-a-new-article
to
http://www.mydomain.com/this_is_a_new_article?
Use:
# RewriteRule ^(.+?)-(.+?)$ (.+?)_(.+?) [R=301,L,NE] ?
|
how to use url rewrite, change url from
to
Use:
| |||
|
feedback
|
|
sedhyphen.sh:
httpd conf:
Make sure that sedhyphen.sh is set executable. Taken from - http://stackoverflow.com/questions/2105009/mod-rewrite-replace-all-underscore-with-hyphen (They were converting the opposite way) You could also do something like this but it is less dynamic RewriteCond %{REQUEST_URI} ^(.)-(.)-(.)/$ RewriteRule (.)-(.)-(.)/ http://website.com$1_$2_$3/ [R=301] | |||
|
feedback
|