Joomla is creating bad URLs which include path to user home directory

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
vincebodie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 138
Joined: Thu Sep 02, 2010 3:57 am

Joomla is creating bad URLs which include path to user home directory

Post by vincebodie » Thu May 05, 2016 6:23 pm

We are having a strange issue which at first glance appears to be an incorrectly configured .htaccess file causing redirects to the root level of the user's cPanel account.

For example this link:
http://example.com/link1

Is being created in the main menu as:
http://example.com/~user/link1

The Joomla install is at the root level of the public_html directory.

SEF URLs and URL Rewriting are set to 'Yes' in Joomla.

The 'System-Redirect' and 'System-SEF' plugins are enabled.

The .htaccess file contains this simple redirect rule:

Code: Select all

RewriteBase /
The issue seems to have cropped up since updating Joomla to 3.5.1 and PHP to 7.x.

Any ideas?

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12785
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Joomla is creating bad URLs which include path to user home directory

Post by brian » Thu May 05, 2016 7:52 pm

Double check to make sure that you do NOT have anything in the global configuration.php for the live site variable

Failing that speak to your web hosts as it sounds like a server config issue
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

vincebodie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 138
Joined: Thu Sep 02, 2010 3:57 am

Re: Joomla is creating bad URLs which include path to user home directory

Post by vincebodie » Thu May 05, 2016 8:59 pm

brian wrote:Double check to make sure that you do NOT have anything in the global configuration.php for the live site variable

Failing that speak to your web hosts as it sounds like a server config issue
Thanks Brian, 'live site variable' is empty... time to post a ticket to my hosting company...

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12785
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Joomla is creating bad URLs which include path to user home directory

Post by brian » Thu May 05, 2016 9:18 pm

that was a long shot ;)
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

vincebodie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 138
Joined: Thu Sep 02, 2010 3:57 am

Re: Joomla is creating bad URLs which include path to user home directory

Post by vincebodie » Thu May 05, 2016 9:30 pm

I forgot to mention that clearing the Joomla cache temporarily fixes the issue. Wondering if this offers any further clue.

vincebodie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 138
Joined: Thu Sep 02, 2010 3:57 am

FIXED - Re: Joomla is creating bad URLs which include path to user home directory

Post by vincebodie » Fri May 06, 2016 3:06 pm

Turns out the issue was corruption in the redirect table of the database. Going to Extensions -> Manage -> Database and clicking the "Fix" button did the trick.

vincebodie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 138
Joined: Thu Sep 02, 2010 3:57 am

Re: Joomla is creating bad URLs which include path to user home directory

Post by vincebodie » Tue May 10, 2016 3:50 pm

OK... the database corruption wasn't the issue after all... the bad link generation has returned.

Here's what I know:

- It's not the redirect setting in the .htaccess file
- There is nothing in the 'live site' setting in Joomla
- 'Collect URLs' is enabled in the 'System - Redirect' plugin
- The problem goes away temporarily whenever I make a change in the admin or delete cache
- The problem seemed to appear when I switched the account's php version from 5.x to 7.x, but switching it back has not fixed it

Any other ideas? This is really frustrating!

vincebodie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 138
Joined: Thu Sep 02, 2010 3:57 am

Re: Joomla is creating bad URLs which include path to user home directory

Post by vincebodie » Wed May 11, 2016 6:29 pm

Finally seem to have found the issue. Before my current hosts I had a VPS hosting plan with Arvixe, and even after cancelling with them they left the account active. I logged into that account and deleted all cPanel accounts. Perhaps some cached DNS somewhere was still pointing some traffic toward that old account.


Locked

Return to “General Questions/New to Joomla! 3.x”