Cometchat: URL fix redirect to /app/webroot/cometchat

I have cometchat enabled for my website.
 
(Almost) Everybody knows that the webroot of mooSocial is served from the app/webroot folder.
If you create a directory, lets say "cometchat" within this directory you can access this via yourmoosite.com/cometchat/ (with the trailing slash at the end).
 
BUT,
 
In some cases (depending on the server/apache configuration), if you enter the same link without the slash (/): yourmoosite.com/cometchat the url will be redirect to yourmoosite.com/app/webroot/cometchat, which isn't a representing url.
 
To fix this issue you can add the following RewriteRules in your .htaccess file (in the root dir of mooSocial installation, not webroot):
 
RewriteRule ^cometchat$ /cometchat/ [L,R=301] 
RewriteRule ^cometchat/admin$ /cometchat/admin/ [L,R=301]
Now yourmoosite.com/cometchat will be redirected to yourmoosite.com/cometchat/ (including the admin).
 
Enjoy cool
Posted in How To on 12/29/16 at 07:19
Comments (3)
I use cometchat also, so thank you for this!
Thanks, ketkew!
Josh  
this at the top before any other calls RewriteRule ^(cometchat) - [L] also works
No login
Login or register to post your comment
Cookies on mooCommunity - Social Networking Script.
This site uses cookies to store your information on your computer.