Rewrite error on search

HI
I have installed suitecrm 8 in a subdirectory on my domain

So the path is https:/mydomain.com/crm/public/index.php

I have set RewriteBase /crm/public/legacy

Accessing content via the menus etc works fine.
However, when I do a search (for any object) and click on the link it inserts the base url twice so i get for example:
https://mydomain.com/crm/public/legacy/www.mydomain.com/crm/index.php?action=DetailView&module=xxx&record=xxx

Where do I fix this?

Hi, welcome to the Community! :tada:

Check for a value called site_url in your config.php (check also config_override.php if you have one).

This value comes from a field you specified during installation.

Thank you. I found it and commented it out and this seems to have resolved

But you should have that value filled in, it is needed in many places. It just needs to be correct.

Maybe your problem is on the other side (the rewrites). You didn’t say where (in which directory) you made the .htaccess changes.

In my system I only have this ReWrite:

./public/legacy/.htaccess:22: RewriteBase /public/legacy

I have made the .htaccess changes in /public/legacy
RewriteBase /public/legacy
I had the siteurl as
main.com

I changed this to https://main.com and it now seems to be rewriting correctly

What I think may have been happening was that the rewrites for the main site (for which this is a subdirectoyr) were being applied first to add the www etc and then the rewrites for Suite wer kicking in as well hence resolving the URL twice

1 Like