PermaLinks conflict
2 posts by 2 authors in: Forums > CMS Builder
Last Post: Tuesday at 6:24pm (RSS)
By moh3 - Tuesday at 8:43am
Hello i'am using perma links and the admin folder is rewritten with the dispatcher ,any idea what the issue is? i'm moved the dispatcher to the roor directory as im protecting the admin folder with password
By Dave - Tuesday at 6:24pm
Hi moh3,
So in .htaccess we have something like this that checks to the see if the URL or permalink exists as a file or directory. If it doesn't it passes the request to the dispatcher:
### Pass URL to permalinks dispatcher (do this last after any other redirects)
RewriteRule ^permalinks_dispatcher\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cmsb/plugins/permalinks/permalinks_dispatcher.php [L]
But if you're password protecting your admin folder with .htaccess and .htpasswd, that can interfere with the directory detection and redirect.
You can try adding a condition to skip your admin folder when processing permalinks. Something like this:
### Pass URL to permalinks dispatcher (do this last after any other redirects)
RewriteRule ^permalinks_dispatcher\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/cmsb/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cmsb/plugins/permalinks/permalinks_dispatcher.php [L]
Let me know if that works for you!
interactivetools.com