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

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?

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