• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 40
  • Last Modified:

joomla redirection


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 Hirst
Jared Hirst
4 Solutions
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.
Julian MatzJoint ChairpersonCommented:
You can do it in Joomla admin. In Joomla 3, it's under Components -> Redirect.
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:


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


put this index.php in  the folder    /test
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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

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.

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

Unneeded question.
Steve BinkCommented:
Either my comment (#39580517) or the comment from Kirblam (#39600422) is the correct solution to this question.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now