i am changing my website and its old pages were like bellow
http://mydomain.com/keyword_city.html
while i read that its better to use - in page for batter SEO, so i am thinking to use new new page name like bellow
http://mydomain.com/keyword-city.html
first of all i want to know is this better idea to change page URL? and if i change my URL does this effect on page ranking ?
i want to know how to write single .htaccess
so that any request coming for old page will redirect to new URL, the only difference in old and new URL will be _ to -
Thanks
The following code added to .htacess should redirect all underscores _
to hyphens -
RewriteRule (.*)_(.*) $1-$2 [N]
I think you are probably looking for:
Redirect 301 /keyword_city.html /keyword-city.html
to be placed in your .htaccess file.
As other people have mentioned though, probably not going to help a great deal when it comes to SEO. One thing that could however is using rich snippets/structured data:
https://support.google.com/webmasters/answer/99170?hl=en
Can be a lot of effort to do but would really help your presence on Google especially.