Permalinks redirect error
2 posts by 1 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: March 3, 2014 (RSS)
By fmqb - March 3, 2014
I installed the permalinks plugin and tested it by accessing the 401 error page. When I try and create a custom permalink however I was taken to the error page. I think this was a cache issue as the problem resolved itself after clearing my browser, however I'm noticing 2 other problems.
1. Removing www from the address takes me to the error page
2. A PHP error from permalinks_dispatcher.php shows up on top
I've entered the fields into the cms as follows:
permalink: contact
source url: /subdirectory/contact.php
My CMS is installed in: domain.com/cms
I've received the following PHP errors so far
Notice: Undefined index: QUERY_STRING in /hermes/bosoraweb059/b144/ipw.quallsgr/public_html/domain/cms/plugins/permalinks_dispatcher.php on line 78 Fatal error: Cannot redeclare getrecords() (previously declared in /hermes/bosoraweb059/b144/ipw.quallsgr/public_html/domain/cms/lib/viewer_functions.php:55) in /hermes/bosoraweb059/b144/ipw.quallsgr/public_html/cms/lib/viewer_functions.php on line 145
Notice: Undefined index: QUERY_STRING in /hermes/bosoraweb059/b144/ipw.quallsgr/public_html/domain/cms/plugins/permalinks_dispatcher.php on line 78
My htaccess file is below:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^permalinks_dispatcher\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cms/plugins/permalinks_dispatcher.php [L]
### Optional SEO: Uncomment the rewrite* lines below to remove www. from all pages so you don't have duplicate urls.
### Source: http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www
##RewriteCond %{HTTPS} off
##RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
##RewriteCond %{HTTPS} on
##RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
##RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
### End: Optional SEO
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
### Optional Security: Uncomment the rewrite* lines below to force secure HTTPS:// connections for all pages.
### NOTE: Make sure https:// urls work on your server before enabling this.
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
### End: Optional Security
</IfModule>
By fmqb - March 3, 2014
I managed to get the page working by including my rewrite rule ahead of the permalink dispatcher rule, but I'm still receiving the following PHP error:
Notice: Undefined index: QUERY_STRING in /hermes/bosoraweb059/b144/ipw.quallsgr/public_html/domain/cms/plugins/permalinks_dispatcher.php on line 78