Hi
Just upgraded from LTS v3 to
5.4.13+221128
I've noted that old admin URLS like:
/index.php/admin/survey/sa/view/surveyid/265676
are now with this syntax:
/index.php/surveyAdministration/view/iSurveyID/265676
And I would lile previous admin URLs automatically redirected to new syntax
I've tried a couple of RewriteRules in the .htaccess but none worked
Has someone already written a similar rule?
You can use Apache's mod_rewrite to create rewrite rules in your .htaccess file that redirect the old admin URLs to the new syntax.
Ex..
RewriteEngine On
# Redirect old admin URLs to new syntax
RewriteCond %{REQUEST_URI} ^/index\.php/admin/survey/sa/view/surveyid/(\d+)$
RewriteRule ^ /index.php/surveyAdministration/view/iSurveyID/%1 [R=301,L]
It checks if the requested URL matches the old admin URL pattern.
^/index\.php/admin/survey/sa/view/surveyid/(\d+)$.
This regular expression matches the old admin URL. t captures the survey ID (\d+) at the end of the URL.
Once done your can test it manually or use browser developer tools to inspect network requests and redirects or use any online tool like redirectchecker*.*com This can help you to get detail redirection chain and its status code.