.htaccess - htaccess URL rewrite space replacement -


Edit note: Modified code for documents

I rewrite I am doing the rules for a customer's website and I started with the rules of rewriting the blog of my website, because they match the needs of the customer. Now when every client's needs are modified, I am happy That is it is working super penalties. Here's the last look;

  option + follow-up symlink is executed repeatedly on Rev.In # unless the URI Recruitment Rule "1 (\ S *) \ s + (\ S * S.) * $" / $ 1- $ 2 [L, East] # executes when URI Racquet Rule "1 (\ S *) \ s (\ S *) $" / $ 1- $ 2 [L is exactly 1 place in R = 302, northeast] #Revereite des URL blog revivalable fashion / blog / ([A-GA-Z-9 SS) + / ([A-GA-Z-9 Ss + +) - ([0-9] +) Fashion / Blogpost.fip? Brand = $ 1 & amp; Url = $ 2 & amp; Id = $ 3 # Reprinted des URL brands reprint fashion / brand / ([a-zA-Z0-9 \ s] +) - ([0-9] +) Fashion / Brand.php? Brand = $ 1 & amp; ID = $ 2 # Reverse URL Shop Brands Rechargeable Fashion / Shop / Brand / ([a-zA-Z0-9 \ s] +) - ([0-9] +) Fashion / Shopbrand.fp? Brand = $ 1 & amp; ID = $ 2 # RAVRIT Url Shop Category Referrellable Fashion / Shop / Category / ([A-GAA-ZD-9 \ -] +) - ([0-9] +) Fashion / Shopper.HP? URL = $ 1 and amp; AD = $ 2 # Extend Enlave L extension% {REQUEST_FILENAME} .php -f Rewrite rule ^ (. *) $ $ 1.php [L] ErrorDocument 404 http: //localhost/fashion/404.php #RewriteCond% { REQUEST_URI}! / Main Tenance.php $ # RewriteCond% {REMOTE_ADDR}! ^ 24 \ .201 \ .45 \ .57 # Rewart Rowl $ / Minesense. FPP [R = 302, L]  

I wanted blogspot having spaces with titles or brand names Avoid, so I added some searches and a \ s in my rules that works fine, because it changes the empty space by % 20 , so now empty Blogpost titles with space are now available, but I would like to change the empty space to dash - And I can not get it right.

There are many articles available that speak about changing the blank space to the dash, but after checking some of them, I came to know that I have difficulties in matching the rules according to my existing rules. .

Any tips or explanations - can use these 2 rules.

Just below RewriteEngine On line:

  U.I.I. reititrele 1 executes more than 1 space until "^ (\ S *) \ s + (\ S * \ S * * $ $ / $ 1- $ 2 [L, Pre] # executes when URI rewriter" 1 (\ S *) \ s (\ S *) $ "/ $ 1- $ 2 [L has exactly 1 position, R = 302, northeast]  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -