permanlink questions and issues

By craig_bcd - September 15, 2015

I have a client who has two websites with two separate domains hosted in one copy of  cmsb.  The secondary domain is run out of a sub-directory of the first.  When I installed permalinks it installed for the primary domain - is there a way I can install it so it works for both domains and/or point it to the secondary domain?


By craig_bcd - October 5, 2015

Greg -

Thanks so much - I apologize for being so thick, I believe I see what you mean but  I am not exactly sure what should go in place of line 11 but it does not seem to reflect the url correctly (see uploaded picture).  I am not sure what to do at this point.

thanks for your help.



# START: CMS Permalink Code
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^permalinks_dispatcher\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cmsAdmin/plugins/permalinks/permalinks_dispatcher.php [L]

### Set URL_SCHEME (REQUEST_SCHEME isn't available before Apache < 2.4 and can include hostname)
RewriteCond %{HTTPS} off
RewriteRule .* - [E=URL_SCHEME:http:\\\]
RewriteCond %{HTTPS} on
RewriteRule .* - [E=URL_SCHEME:https:\\\]

### Force www. prefix - (RECOMMENDED/OPTIONAL) SEO to prevent duplicate urls (uncomment to use)
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^(.*)$ %{ENV:URL_SCHEME}://www.%{HTTP_HOST}/$1 [R=301,L]

### Remove www prefix - Optional SEO to prevent duplicate urls (uncomment to use)
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
#RewriteRule ^(.*)$ %{ENV:URL_SCHEME}://%1/$1 [R=301,L]

### Force HTTPS secure connections - Optional security (uncomment to use)
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

# END: CMS Permalink Code


permalink.PNG 30K

By gregThomas - October 5, 2015

Hey Craig, 

You need to adjust line 11 so that it is the relative path from the base directory of that site to the CMS permalinks dispatcher. 

The path used on the permalink field in the CMS that is shown in your screenshot is there to show the user what the final URL will look like. It gets the URL from the general settings of the CMS.

Let me know if you have any questions. 



Greg Thomas

PHP Programmer -

By craig_bcd - October 5, 2015

hey Greg, thanks so much for your speedy response.  Maybe what I want to do is not possible in my current configuration. So let me backup a little and give you some more background.  

  • There are two sites powered by one implementation of cmsb.
  • cmsb is installed in public_html\cmsAdmin for the primary domain
  • the primary site is public_html\
  • the second site is public_html\de
  • we just path back attachments, etc. to the primary domain for the secondary domain since the path for that stuff is really hidden, it does not matter much.  But for permalinks that does not really work since the permalinks really need to be attached to the secondary domain.
  • Unless I am miss-understanding this or there is some way to use the development domain entries in cmsb it looks like I may need to install a separate installation of cmsb for this other domain

What do you think?

Thanks, again, I really appreciate how helpful you guys are, it's one of the reasons I don't build websites without cmsb 

By Damon - October 5, 2015

Hi Craig,

If one of these sites is for development, you can use the same CMS Builder license and do a separate installation.

This will allow you to have separate Permalink plugin settings which will make everything much easier. 

You can also backup the database in CMS Builder from the current installation, copy it over, along with uploads and your section editors (schemas) to the new installation and then restore the database from the backup.

Would this work for you?

Damon Edis -

Hire me! Save time by getting our experts to help with your project.

By craig_bcd - October 6, 2015

Hi Damon -

Thanks - i'll get another copy of cmsb, install it and move it over so it is independent from the other site.  Thanks as always for your help.



By craig_bcd - October 7, 2015

Hi Damon -

Totally working now!  Thanks for all your help.  I am getting one error in the error log, see below:  Not sure  I do see a query string at line 110 in the permalinks_dispatcher.php file but not sure what to do about it. 

E_NOTICE: Undefined index: QUERY_STRING
/hermes/waloraweb050/b481/as.delancey/public_html/de/cmsb/plugins/permalinks/permalinks_dispatcher.php (line 110)



By Damon - October 7, 2015

Hi Craig,

If you go to the URL:

you will see this message:
No 'Detail Page URL' set under: Admin > Section Editors > 'landing_page' > Viewer Urls!

In CMS Builder,  add a  Detail Page URL under the Viewer Urls tab for your landing_page Section Editor and the error should go away.

Let me know if that works for you.

Damon Edis -

Hire me! Save time by getting our experts to help with your project.