Okay this might be little off from programming. But if let's say that I have a website that its url is rewritten from
www.example.com?index.php?id=1&cat=category&title=My-Title
to
www.example.com/1/category/My-Title
will it be able to be searched as the second Url by search engines? For example, if I type "category my-title" Google will show
www.example.com/1/category/My-Title
instead of
www.example.com?index.php?id=1&cat=category&title=My-Title
Or is there any necessary code need to be added to htaccess file?
Rewrite and 301 redirect to the new page, but also don't forget to ad the canonical link to the head. In your case:
<link rel="canonical" href="http://www.example.com/1/category/My-Title" />
Also, I advise against using capital letters in urls.
If you need to change the URL of a page as it is shown in search engine results Google actually recommends using server side 301 (Moved Permanently) redirects.
You can use the same technique (server side 301 redirects) if you have multiple URLs to the same page. Then you use the redirect to the default page.
So in your case www.example.com/1/category/My-Title
will be the URL used by Google search engine.
Please have a look at Google Webmaster Tools - 301 redirects which explains redirects in greater details.
I hope that will help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With