: Is it SEO-friendly to redirect with .htacces to the same PHP file? Suppose I have a .htaccess file, which would take a SEO-friendly URLs like www.site.com/sub-category/spices, www.site.com/sub-category/vegetables
Suppose I have a .htaccess file, which would take a SEO-friendly URLs like site.com/sub-category/spices, site.com/sub-category/vegetables etc, and redirect them to the file site.com/sub-category/page_generator.php?item=spices. That is, page_generator.php would take the last part of the URL as a GET parameter, and then generate the page with database calls.
I do not know a lot a about search engines, but I think that a search engine cannot see page_generator.php (since it's hidden by .htaccess), and thus associates the resulting webpage with the URL site.com/sub-category/spices, and not site.com/sub-category/page_generator.php?item=spices, which is good in terms of SEO.
Is this correct?
More posts by @Chiappetta492
1 Comments
Sorted by latest first Latest Oldest Best
Is this correct?
Basically, yes.
redirect them to the file...
It's more usual to refer to this as a URL rewrite (or internal rewrite), rather than a "redirect" - which is more commonly used to refer to an (external) HTTP redirect. Although it is still a redirect of sorts and the Apache docs do often refer to it as an "internal redirect".
which is good in terms of SEO.
Strictly speaking, these are "user"-friendly URLs, not necessarily SEO-friendly. Search engines understand the URL parameters perfectly well - so to the search engines it makes little difference. However, users find them easier to deal with, which can improve click-through rates. So, indirectly, they can help draw traffic to your site, but they do nothing to improve your ranking directly.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.