I've almost completed the tedious task of migrating a relatively complex Joomla site over to Wordpress.
The (more or less) final stage I am wishing to figure out is the 301 redirections. I've spent the past few hours researching this topic, but I've not found any tips specific to my situation (particular the sub-directory structure). I'd greatly appreciate some hand-holding. I don't wish to mess this up because I realise it could impact the hundreds of incoming links from search engines.
Here's the background information:
Joomla was installed in
Wordpress has been installed in
All Joomla articles were migrated to Wordpress installation, and post IDs were maintained.
Joomla URI permalink structure for articles is:
The ### is the unique ID of the article on Joomla (aka post ID).
The posts in Wordpress have the same unique ID. Thus
www.domain.com/site/20110623398/articles/category-slug/article-slug.htmlcan be redirected to
There are a few other URI structures I'll need to handle. But I will address that once I have the redirection of the articles figured out.
MY QUESTION (IN PARTS)
How do I set up the .htaccess file so that all incoming links to joomla articles have the unique ID extracted and then redirect to
/?p=UID(as a 301 redirect)?
How do I do this in such a way that the site will always use or display
domain.com/as the home directory (with and without the www), whilst keeping the site located in
/site, if that works better for the redirects - which I suspect it will).
I don't, however, want the site to ever load up and show a
/wordpress/post-name-etc/type URI (or
/site/post-name-etc/URI). Meaning I want the
/site/part to always be removed from the end user point of view (including search engines).
I believe the .htaccess file is also used for this.
Along with many other sites and posts, I have read the info related to Giving Wordpress It's Own Directory on the WordPress Codex.
Point #4 on that article says, "Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address).", but I have a .htaccess file in the root already, and it has lots of code in it.
Is it okay to just copy the index.php and not the WP htaccess file?
Points (2), combined with (1), is where I came a bit unstuck. Getting all the articles on
domain.com/site/ to redirect to
domain.com/, and for the correct page to come in from
domain.com/wordpress without displaying the
As mentioned above, I suspect it may be best if I move the wordpress site to
domain.com/site (and change it's configuration file home directory settings accordingly).