permanlink questions and issues

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?

thanks!

Hi Craig,

I've not tested this, but you should be able to get the permalinks working on both sites by having a separate .htaccess file in the base directory of each site. You'll need to update the path to the permalink dispatcher on line of 11 of the htaccess for the site in the subdirectory. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

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.

Regards,

Craig

# 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:\\debt-economics.org\]
RewriteCond %{HTTPS} on
RewriteRule .* - [E=URL_SCHEME:https:\\debt-economics.org\]

### 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]

</IfModule>
# END: CMS Permalink Code

Attachments:

permalink.PNG 30K

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. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

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?

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

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.

Regards,

Craig

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)
http://www.debt-economics.org/sample

Thanks!

Craig

By Damon - October 7, 2015

Hi Craig,

If you go to the URL:
http://www.debt-economics.org/sample

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.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/