htaccess rewrite replace space with -

后端 未结 1 1416
谎友^
谎友^ 2021-01-14 20:46

I am really stuck on a rewrite rule and wonder if anyone can help.

I am pulling data from a database, and as an example the field \"name\" i use sometimes has 2 word

相关标签:
1条回答
  • 2021-01-14 21:13

    Can you try this rule in your .htaccess:

    RewriteEngine on
    RewriteRule ^clubs/([^\s]+)\s([^\s]+)/([^\s]+)\s([^\s]+)/$ /clubs/$1-$2/$3-$4/ [R=302,NC,L]
    
    0 讨论(0)
提交回复
热议问题