joomla redirection

Hi,

I have a joomla site abcxxx.com. I wish to redirect the URL abcxxx.com/test to my addon domain defxx.com. However i am not able to do so via  cpanel redirect option. Is is possibly to do via joomla adminstrator?

NB : please note that folder 'test' does not exists and it seems to be the reason why cpanel redirection is not working.

Please assist
Jared HirstCEOAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve BinkCommented:
When you try to do it through cPanel, what results are you seeing?

You can always try modifying the .htaccess file directly.  You're looking for a rewrite like this:
RewriteCond %{HTTP_HOST} ^(www\.)?abcxxx\.com$ [NC]
RewriteRule ^/?test(/.*)?$ http://defxx.com$1 [NC,R,L]

Open in new window

Note: this is untested and might need refining.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Julian M.Web DeveloperCommented:
You can do it in Joomla admin. In Joomla 3, it's under Components -> Redirect.
0
Peter HartCommented:
I would do it outside of Joomla

make sure you have no pages that have alias of "test"  or whatever  your folder is called.

Create a file with a simple text editor and call it  index.php file  which has the following code:

<?php

   header( 'Location: http://www.defxx.com' ) ;

?>

put this index.php in  the folder    /test
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

kirblamCommented:
If a simple redirect is ok, open your joomla's .htaccess file. If you're not using source control, I would keep a backup of this file.

Anywhere after:
RewriteEngine On

Add
Redirect 301 /test http://www.defxx.com

IF you need /test/blah and /test/blah2 to map to http://www.defxx.com/blah and http://www.defxx.com/blah2, you will need some variation of routinet's solution above.

Rewriting (routinet's solution) can be tricky to get right but once you have it correct, it's usually 'set it and forget it'. Hopefully you have a test environment. Versions of apache *may* handle it differently so the closer the test to production, the less guesswork. URL rewriting is one of the few area of the LAMP stack where I have noticed significant discrepancies between environments.

Good luck.

K
0
Jared HirstCEOAuthor Commented:
I've requested that this question be deleted for the following reason:

Unneeded question.
0
Steve BinkCommented:
Either my comment (#39580517) or the comment from Kirblam (#39600422) is the correct solution to this question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.