Jump to content

Knowledgebase rewrite in WordPress not working


PDS

Recommended Posts

I have WHMCS integrated with wordpress but I'm having trouble getting the knowledgebase SEO friendly urls to work. I keep getting the error "page doesn't exist" when clicking test entry.

 

The option for SEO friendly URLS in General Settings is ticked and file is named .htaccess and chmod 644.

 

If I adjust the .htaccess directive path and place file in whmcs root - My support folder doesn't load at all (like a dead link). Non friendly URLs load OK.

 

Here is my root .htaccess and I have WHMCS in support directory (secure rewrite works OK):

 

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Options +FollowSymlinks

#Rewrite the URL for WHMCS to always use https except for the whmcs/dl.php file
RewriteCond %{REQUEST_URI} !^/support/dl.php [NC]
RewriteCond %{REQUEST_URI} ^/support/ [NC]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://mysite.com/$1 [R=301,L]

#Rewrite the URL for WHMCS dl area to always use http
RewriteCond %{REQUEST_URI} ^/support./dl.php [NC]
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L]

# Knowledgebase
RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.php$ /support/knowledgebase.php?action=displayarticle&id=$1 [L,NC]
RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ /support/knowledgebase.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^knowledgebase$ /support/knowledgebase.php [L,NC]

<Files "cron.php">
Allow from All
Satisfy Any
</Files>

<Files ~ "\.tpl$">
Order allow,deny
Deny from all
</Files>

 

When I hover over the test entry link this is the URL:

https://mysite.com/support/knowledgebase/1/MySQL-Backups.html

 

I'm thinking its something to do with the .html suffix in wordpress may be the conflict. I have also tried as shown above (htaccess) using .php suffix.

 

I've been trying to get this working for a couple of days now and just don't know what else I can try.

 

I'd really appreciate some help please?

 

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated