Redirect Drupal node to WordPress ID?
-
I have just migrated a Drupal site to WordPress and I need to redirect the Drupal URLs to default WordPress URLs – ie, from URL format [domain]/node/XXX to [domain]/?p=XXX. It would seem a simple enough thing to do but I just can’t seem to get it to work. The code I’m using in HTACCESS is as follows:
<IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine on RewriteCond %{QUERY_STRING} ^q=node/(.+)$ RewriteCond %{REQUEST_URI} ^/node/(.+)$ RewriteRule ^(.*)$ https://www.bikesonshow.com/?p=%1 [R=301,L] </IfModule>
I’ve tried to capture both possible Drupal URL formats. No idea why it won’t work. Any suggestions would be welcome.
Update: FYI I am seeing the following errors in my server error log:
[Sat Jul 02 02:20:12 2016] [alert] .../.htaccess: RewriteRule: cannot compile regular expression '^?q=node/(.*)', referer: https://www.bikesonshow.com/node/377
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Redirect Drupal node to WordPress ID?’ is closed to new replies.