.htaccess - Redirect wordpress urls to joomla urls on the same domain -
this first question on stack overflow. site bible me , hope question not redundant.
well. i'm creating news site joomla 3. site replcae , old site made wordpress. i'd set redirect rules on same domain.
on wordpress news this: /ita/news or /eng/news/ on joomla conf: /ita/category/id-news.html /eng/category/id-news.html news have same title , same url both on joomla , wp there ia way on htaccess match title of news of wp links , compare last part of links of joomla site , set rewrite condition?
if not possible possibilities creare redirect 301 news? this?
redirect 301 /ita/news /ita/category/id-news.html
thanks gabriele
use redirectmatch
specify pattern.
redirectmatch 301 /([^/]+)/([^/]+) /$1/category/id-$2.html
using mod_rewrite
instead, able restrict redirection happen when url path (i.e. directory structure /eng/news/
) physically not exist.
rewriteengine on rewritebase / rewritecond %{request_filename} !-d # not dir rewritecond %{request_filename} !-f # not file rewriterule ^([^/]+)/([^/]+)$ $1/category/id-$2.html [r=301,l]
this assumes .htaccess
resides in web root folder.
Comments
Post a Comment