Support

Admin Tools

#21611 URL Redirection not working

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 tampe125 on Wednesday, 03 December 2014 01:26 CST

lucylyn
I have set up Admin tools on a website for a client www.firstchoicepurchasing.com which went live over the weekend. Previously I have this website set up on a different domain while I was building it.

I set up Admin tools like have done many time in the past and set up URL Redirections from the old URL's to the new ones I had created on the website (please see attached screenshot).

Here is an example of one of the redirections I set up

From: www.firstchoicepurchasing.com/testimonials.aspx
to: http://www.firstchoicepurchasing.com/info/testimonials

All the URL's ending in .aspx are the old ones and you will see from my screenshot I have set these up under New URL without a trailing /, and have set up the new pages I created under existing URL with the / before them (having followed posts here).

However if I go to site:firstchoicepurchasing.com and then click on any of the URL's I get a 404 page. The strange thing is its a standard 404 page (see attached) but I have a special 404 page for the website (see attached).

I don't know why this is happening.

The only difference on this website is that I normally change the Name Servers where the domain is located over to my hosting, but on this occassion the client wanted it done differently. They created A Record for firstchoicepurchasing.com and www.firstchoicepurchasing are directed to the IP address of my web server.

Could this be causing a problem, or have I made some error?

Many thanks
Lynda

tampe125
Akeeba Staff
Hello Lynda,

the main problem is that .aspx pages are not caught by your current .htaccess file, so the original request is handled directly by your webserver, eluding Joomla at all.
Since you don't have an .aspx interpreter, the server answers with its own error page (not the custom one you set).

You have to manually edit your current .htaccess file. You have to find this line:
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|raw|ini|zip|json|file|vcf))$ [NC]`
And add |asp|aspx right vfc chars.
So to recap, your new line will be something like this:
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|raw|ini|zip|json|file|vcf|asp|aspx))$ [NC]`
HOWEVER!!
There's a little catch: that line is automatically generated by Admin Tools and there's no way to change it. You have to manually add those two suffixes ever time you regenerate your htaccess file.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

lucylyn
Hi Davide

Thanks a million, that worked perfectly.

Regards
Lynda

tampe125
Akeeba Staff
You're welcome!

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
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!