blueriver / MuraTranslations

Mura Translation Manager
Apache License 2.0
7 stars 10 forks source link

Question concerning siteID in URL #47

Open Tigerlady opened 4 years ago

Tigerlady commented 4 years ago

I have posted this in the Google Group as well.

Hello, we are in the process of migrating a site from 7.0 to 7.1 (Core Version 7.1.488), that is using the Translation plugin. I have most everything work except for the default site with the ID of default showing in the url string. The primary site shows this https://dev.mysite.com/default/

and the word default shows up in all url strings for the main site. I do not want the word default to show up in the url string at all. This would also majorly affect our SEO standings.

In the /sites/default/contentRender.cfc file i have set

(I thought the following was supposed to override the primary settings. I just get a redirect loop. )

//Set these to a boolean value to override settings.ini.cfm value this.siteIDInURLS="false"; //this.indexFileInURLS=""; //this.hashURLS="";

In my other language sites this is commented out. When I set it to false the site goes into a redirect loop and will not render.

If I set it to True the word default shows up again but the site does render.

This used to work on the 7.0

One other note I am on Windows and therefore use the web.config file like this.

<rule name="Korean: index.cfm" enabled="true" stopProcessing="true">
    <match url="^kr/([a-zA-Z0-9_\-].+)$" ignoreCase="true" />
    <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{QUERY_STRING}" pattern="(hash)" negate="true" />
    </conditions>
    <action type="Rewrite" url="/kr/index.cfm/{R:1}" appendQueryString="true" />
</rule>
<rule name="Spanish: index.cfm" enabled="true" stopProcessing="true">
    <match url="^es/([a-zA-Z0-9_\-].+)$" ignoreCase="true" />
    <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        <add input="{QUERY_STRING}" pattern="(hash)" negate="true" />
    </conditions>
    <action type="Rewrite" url="/es/index.cfm/{R:1}" appendQueryString="true" />
</rule>
<rule name="Mura CMS Rule 1: siteid and index.cfm" enabled="true">
    <match url="^(.*)" ignoreCase="true" />
    <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="/index.cfm/{R:1}" appendQueryString="true" />
</rule>

One more note all my sites share the same theme for mockup and layout and the theme contentrender.cfc does not have any mention of the site id in url.

Any help would be greatly appreciated.

Thank you.

Tigerlady commented 4 years ago

Hello, wanted to try again to see if anyone had any ideas. I have continued to work on the site but am running into issues where url's will be wrong with the word "default" in the url string. I have also just realized that any pages after the home page do not render in the other language sites so for example

https://dev.mysite.com/ES/productos/disenos-ligeros-de-peso/ . gives me a 404 instead of displaying the page I have tried several things to get this to work and am really stuck till I get the url bits figured out. So again anyone who has worked with this in 7.1 please could really use some help here.

Thank you.

Tigerlady commented 4 years ago

Does anyone read the issues? I am still getting redirect issues when setting the siteidinurls = 0 in the default content render file.

In settings.ini file it is set to true and all the other sites are working fine. It is only the default site that I want to have no site id in the url. I am not even sure if any one is reading this. I could really use some help here.

Thank you.

m-evangelista commented 4 years ago

Hi Barb,

Do you have the Mura rewrite rules in place, in either your .htaccess or web.config file? For problems like this, you'll get a better response by posting in the Mura Google group https://groups.google.com/forum/#!forum/mura-cms-developers

Tigerlady commented 4 years ago

Michael, I did post this in the Google Groups days ago and still have not answers. I do have rewrite rules in the webconfig file I have tried several different things.

So this works for every site except for the default site.

`

    <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="/index.cfm/{R:1}" appendQueryString="true" />
</rule>

` The big issues is the redirect loop when I set the siteID in the site contentrender file.