I am upgrading my site which involves new scripts and a different URL structure. There are currently a few thousand pages so I want to basically move them in to a subdirectory so that they are not lost.
I am not very confident with htaccess so can someone please confirm that the first part I have done is correct:
Old URL: http://www.example.com/article/another-dir/page-group/whatever.html
RewriteRule ^article/?$ http://www.example.com/archive/ [R=301,NC,L]
To achieve this: http://www.example.com/archive/another-dir/page-group/whatever.html
Search engines will see the above as a permanent move and in the address bar it will show the new url. Is this right?
The second part is on the new script - the url's could be improved but I am unable to change all the script so thought about using htaccess again but am not sure if it can be achieved like this.
At the moment the url looks like this: url: http://www.example.com/category/4/categoryname
In the htaccess the current rewrite rule for this type of url looks like this:
RewriteRule ^category/(.*)/(.*)$ category.php?id=$1&slug=$2
Is it possible to change this so that in the url address bar I end up with this: http://www.example.com/categoryname
Basically I don't want to see either the number or category/ in the resulting url as it will be easier for visitors to use - is that possible??
Thanks in advance for any help.