Support

Admin Tools

#9710 Need htaccess wizardry.

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Monday, 06 December 2010 20:37 CST

savvygroup
Hello,

This isn't very a Admin Tools Pro specifically orientated question but I am looking to do almost some sort of a conditional redirect.

Here is what I am looking for (pseudo code):
IF user accesses our old site by http://(www).oldwebsite.com
THEN redirects to a specific page on our new site, Ex: http://newsite.com/index.php?specificpage=blah
ELSE IF user accesses site by some old urls Ex: http://(www).oldwebsite.com/OLDURL
THEN wildcard redirects to the same specific page on the new site http://newsite.com/OLDURL

I hope that makes sense.

In addition, I think this might be a nice feature for admin tools (Although I am sure you thought of it already). Set up something similar to CPanels redirect. 3 fields - old url, new url, and type of redirect. Let the user add as many as they would like.

Thanks for your help!

nicholas
Akeeba Staff
Manager
I am a big fan of the DReW (Don't Reinvent the Wheel) principle. What you describe is exactly what Apache's mod_rewrite was written for and you can easily place such rewrite rules in your .htaccess either manually or, if you're using the .htaccess Maker feature, in the custom rules textbox. For more information on mod_rewrite magic I suggest reading the official documentation of Apache's mod_rewrite and its practical guide to common problems. Writing the necessary redirection rules is tricky and takes quite some trial and error to make them work.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!