Answer the question
In order to leave comments, you need to log in
How to replace spaces in URL in htaccess?
On my site, the page URLs contained spaces. For CNC, at the request of SEO, spaces in the URL were replaced with dashes. There are more than 2000 such pages. Now I need to write a Redirect 301 for these pages. Writing a Redirect 301 on every page is not an option, and I didn't succeed with regular expressions. Help, please, who can.
Answer the question
In order to leave comments, you need to log in
From the simplest and most problem-free in further support - in php, see if there is a space in the url, if there is - do a redirect.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question