Alternative
Add below PHP Code
at the top of index.php
or configuration.php
of Joomla!
It checks for numerical catid
& Itemid
requests & if Itemid=435
It will redirect URL with catid
& new Itemid
. Feel free to modify code according to your need!
if(isset($_GET['catid']) && is_numeric($_GET['catid']) && isset($_GET['Itemid']) && is_numeric($_GET['Itemid']))
if($_GET['Itemid'] == 435)
{
$catid = $_GET['catid'];
$location = "/index.php?option=com_adsmanager&view=list&catid=$catid&Itemid=565";
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '. $location);
}
Answer - 2
I assumed that you wants is to redirect URI-1
to URI-2
.
index.php?option=com_adsmanager&view=list&catid=8&Itemid=435
index.php?option=com_adsmanager&view=list&catid=8&Itemid=565
Below mod_rewrite
will let you redirect specific URI
to other specific URI
.
Just add below rules in .htaccess
file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^option=com_adsmanager&view=list&catid=8&Itemid=435$
RewriteRule ^/?index\.php$ /index.php?option=com_adsmanager&view=list&catid=8&Itemid=565 [R=301,L]
</IfModule>
Answer - 3
Use below in your .htaccess
, if you want to handle requests with'/index.php'
and '/'
.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^option=com_adsmanager&view=list&catid=8&Itemid=435$
RewriteRule ^(.*)$ /index.php?option=com_adsmanager&view=list&catid=8&Itemid=565 [R=301,L]
</IfModule>
NOTE: Do not use both code in single .htaccess
file.