I’m rewriting a website that was originally in Drupal and has very specific URL’s.
So, I need to rewrite all the original URL’s to the wordpress system + the parameters for my own-written plugins:
I need to get from this:
http://www.domain.com/param1/param2/param3/param4/param5/detail
To this:
http://www.domain.com/index.php/detail/?param=param5
If the last part of the url = “detailSOMETHING“
I’ve tried this (and many variations on it):
RewriteRule ^/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([detail_]+.*)/? \
/wp1/index.php/detail/?gref=$5 [PT]
placed in front of the WordPress code in .htaccess, but all I get is my WordPress 404 page.
Any help is appreciated!!!!!
EDIT:
Full .htaccess added:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp1/
RewriteRule ^/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([detail_]+.*)/? \
/index.php/detail/?gref=$5 [PT]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp1/index.php [L]
</IfModule>
# END WordPress