Opened 12 days ago

Last modified 10 days ago

#14460 assigned Task/To do item

Drupal 6 migrated to WordPress - some cleanup and re-direct help

Reported by: https://id.mayfirst.org/newpolitics Owned by: https://id.mayfirst.org/jaimev
Priority: High Component: Tech
Keywords: Cc: rogermanningnyc@…
Sensitive: no

Description (last modified by https://id.mayfirst.org/newpolitics)

hi MF,

We've recently migrated our Drupal 6 site to WordPress. It's located in the old Drupal 'newpol.org' hosting order on June. Drupal 6 has been un-installed via the 'Web Application' option in the cpanel - though we've retained the 'sites/default/files' directory as migrated content is still pointing to those files. The PHP version set to 7 in Web Configuration.

1) Cleanup: Some advice/help on clearing out/un-installing unneeded items in /home/members/newpolitics/sites/newpol.org/users/newpolitics such as Drush and other applications located there?

2) Any advice on why the below 301 redirect is not working from either the WordPress .htaccess file or the Advanced Settings area of Web Configuration? Trying to get Drupal path '/node/' to redirect to WordPress path '/?p='

Thanks! rm

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^q=node/(.+)$
RewriteCond %{REQUEST_URI} ^/node/(.+)$
RewriteRule ^(.*)$ https://newpol.org/?p=%1 [R=301,L]

Change History (3)

comment:1 Changed 12 days ago by https://id.mayfirst.org/newpolitics

  • Summary changed from Drupal 6 migrated to WordPress - some cleanup and re-direct helpx` to Drupal 6 migrated to WordPress - some cleanup and re-direct help

comment:2 Changed 11 days ago by https://id.mayfirst.org/newpolitics

  • Description modified (diff)

comment:3 Changed 10 days ago by https://id.mayfirst.org/jaimev

  • Owner set to https://id.mayfirst.org/jaimev
  • Status changed from new to assigned

You don't really need to preserve anything in your home folder other than your own Maildir, the symlink to your web folder, and maybe the .ssh folder if you are using key based access. You can remove the rest but a backup is always a good idea.

0 newpolitics@june:~$ ls -ld {Maildir,newpol.org,.ssh}
drwx------ 5 newpolitics newpolitics 4096 Feb  7 03:27 Maildir
lrwxrwxrwx 1 newpolitics root          42 Feb 23  2009 newpol.org -> /home/members/newpolitics/sites/newpol.org
drwxr-xr-x 2 newpolitics newpolitics 4096 Jul  3  2018 .ssh

I'm not really sure about those Rewrite rules. I think if you removed the 3rd line it would work for a URL like https://newpol.org/node/1234 but I'm not sure about all the conditions you need to meet.

I found this nice little utility that lets you test your rewrite rules.

https://htaccess.madewithlove.be/

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.