On my site, users can add various URLs that need to be redirected.
For instance; from this: domain.com/oldpage/36/
To this: domain.com/newpage/47/
They are added to .htaccess as follows:
Redirect 301 /oldpage/36/ /new-page/47/
But when accessing the old page, they get the following:
domain.com/newpage/47/?pid=36&pagename=oldpage
I am sure that these rewrite rules cause this predicament:
RewriteRule ([^.]+)/([0-9]+)/$ index.php?pid=$2&pagename=$1
RewriteRule ([^.]+)/([0-9]+)/([^.]+) index.php?pid=$2&pagename=$1&vars=$3
However, mod_rewrite stuff is not my strong point, so I have no idea how to fix it.
Any ideas?
source
share