You need to update .htaccess for cakePHP.
Here are the content and explanation of new .htaccess.
1. To make Trac and cakePHP work together, we need to add
RewriteCond %{REQUEST_URI} !^/trac*
inside cakePHP rewrite rules
2. To make Trac HTTP authentication work, we need to add
ErrorDocument 401 /401.html
and create 401.html on the same directory as cakePHP.
Taken from: https://wordpress.org/support/topic/htaccess-and-subdirectories/
401.html can be empty file or use the following HTML tags.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
</body></html>
It will only display when someone failed to login.
ErrorDocument 401 /401.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^$ app/webroot/ [L]
RewriteCond %{REQUEST_URI} !^/trac*
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
Comments
0 comments
Article is closed for comments.