Reputation: 73
I have a bunch of subcategory index pages on the root level of my site that I inherited from a previous developer with unnested url's like www.example.com/Category1_Index.php
. My effort is to "friendly-ize" these to www.example.com/category1/subcategory1/
and so forth.
Here is the mod-write rule I am implementing for the individual url's:
RewriteRule ^category1/subcategory1/?$ Category1_Index.php [NC]
My dilemma is, am I passing the link juice (at least 90% of it) from the old url to the new one this way? Or am I missing something? Is a 301 redirect needed instead? (I'm actually unclear after days of research.)
A couple of things for the record:
Upvotes: 0
Views: 139
Reputation: 272086
Seems like you changed the URL of your pages from this:
www.example.com/Category1_Index.php
to this:
www.example.com/category1/subcategory1/
But you did not redirect your *.php
URLs to the friendly version. This causes two problems straight away:
The latter causes additional problems:
The solution is to 301 redirect *.php pages to their friendly version. This informs search engines and browsers that the address of page has changed. You still need to use URL rewriting.
Upvotes: 1