I've been working lately to add couch CMS to another website. +1 for awesome support my first time around. I never got around to adding pretty url's to the first site, but I figured I'd give it a shot here.
Upon extracting the .htaccess file from gen_htaccess.php, I appended it to my existing .htaccess file on the site's root and was hung up with a redirect error.
Following documentation has been reviewed:
http://docs.couchcms.com/concepts/pretty-urls.html
Following forum topics have been reviewed and methods tested:
viewtopic.php?f=4&t=9550
viewtopic.php?f=4&t=4254
viewtopic.php?f=2&t=7388
Checks:
Is modrewrite enabled? Yes
Is apache > version 1.x? Yes v.2.2.29
Additional information
The site is currently being rerouted from it's initial directory of public_html to websites/mysite/(site hosted here).
The .htaccess mod rewrite code is listed below (from public_html folder).
NOTE: MYSITE.COM ADDED TO CODE FOR CONFIDENTIALITY PURPOSES
.htaccess file in /websites/mysite/.htaccess has the following rules to battle recent xss script attack on server.
SPECIAL NOTE: XSS SCRIPT INJECTION WAS FIRST NOTED MID AUGUST. SITE HAS BEEN DUMPED AND REBUILT FROM GROUND UP SINCE. SITE DID NOT HAVE COUCH INSTALLED PRIOR TO INFECTION. COUCH WAS RECENTLY ADDED TO NEW REDESIGN LAUNCHED POST INFECTION WITH APPROPRIATE COUNTERMEASURES ADDED. REWRITES BELOW SOLE PURPOSE ARE TO HELP EXPEDITE REMOVAL OF DEAD LINKS FROM GOOGLE, BING, ECT.
Config File was as follows (reverted back to no pretty urls pending investigation). NOTE: Apparently the mod rewrite to change the initial directory for the site listed above required modifying the K_Site_URL to what is currently listed below for couch cms to work in the first place (puts me in the "special cases" apparently).
// 1.
// If necessary, define the full URL of your site including the subdomain, if any.
// V.IMP: Don't forget the trailing slash!
define( 'K_SITE_URL', 'http://www.mysite.com/' );
// 8.
// Set the following to '1' if you wish to enable Pretty URLS.
// After enabling it, use gen_htaccess.php to generate an .htaccess file and place it in the root folder of your site.
define( 'K_PRETTY_URLS', 1 );
To recap, the following behaviors were recorded by the server. Internal 500 error at first, redirection in a way the server can never process secondary (infinite loop syndrome).
Any help would be greatly appreciated, but since this is a personal site, rush assistance is not required. If you would like additional information about my setup, let me know and I can provide further details. Brain's burnt out for now.
Upon extracting the .htaccess file from gen_htaccess.php, I appended it to my existing .htaccess file on the site's root and was hung up with a redirect error.
Following documentation has been reviewed:
http://docs.couchcms.com/concepts/pretty-urls.html
Following forum topics have been reviewed and methods tested:
viewtopic.php?f=4&t=9550
viewtopic.php?f=4&t=4254
viewtopic.php?f=2&t=7388
Checks:
Is modrewrite enabled? Yes
Is apache > version 1.x? Yes v.2.2.29
Additional information
The site is currently being rerouted from it's initial directory of public_html to websites/mysite/(site hosted here).
The .htaccess mod rewrite code is listed below (from public_html folder).
NOTE: MYSITE.COM ADDED TO CODE FOR CONFIDENTIALITY PURPOSES
- Code: Select all
# .htaccess main domain to subdirectory redirect
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/websites/mysite/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /websites/mysite/$1
# Change example.com to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteRule ^(/)?$ websites/mysite/index.php [L]
.htaccess file in /websites/mysite/.htaccess has the following rules to battle recent xss script attack on server.
SPECIAL NOTE: XSS SCRIPT INJECTION WAS FIRST NOTED MID AUGUST. SITE HAS BEEN DUMPED AND REBUILT FROM GROUND UP SINCE. SITE DID NOT HAVE COUCH INSTALLED PRIOR TO INFECTION. COUCH WAS RECENTLY ADDED TO NEW REDESIGN LAUNCHED POST INFECTION WITH APPROPRIATE COUNTERMEASURES ADDED. REWRITES BELOW SOLE PURPOSE ARE TO HELP EXPEDITE REMOVAL OF DEAD LINKS FROM GOOGLE, BING, ECT.
- Code: Select all
# redirect .pdf and directories to 410 response
RewriteRule \.pdf$ - [G]
RewriteRule \.swf$ - [G]
RewriteRule ^infect/ - [G]
RewriteRule ^o59miv707/ - [G]
RewriteRule ^k4q65l11x/ - [G]
RewriteRule ^vihsidob2va/ - [G]
RewriteRule ^4ghr3vpb1/ - [G]
#Deny Image index and PDF index
<Files ~ "\.pdf$">
Header set X-Robots-Tag "noindex, nofollow"
</Files>
<Files ~ "\.(png|jpe?g|gif)$">
Header set X-Robots-Tag "noindex"
</Files>
Config File was as follows (reverted back to no pretty urls pending investigation). NOTE: Apparently the mod rewrite to change the initial directory for the site listed above required modifying the K_Site_URL to what is currently listed below for couch cms to work in the first place (puts me in the "special cases" apparently).
// 1.
// If necessary, define the full URL of your site including the subdomain, if any.
// V.IMP: Don't forget the trailing slash!
define( 'K_SITE_URL', 'http://www.mysite.com/' );
// 8.
// Set the following to '1' if you wish to enable Pretty URLS.
// After enabling it, use gen_htaccess.php to generate an .htaccess file and place it in the root folder of your site.
define( 'K_PRETTY_URLS', 1 );
To recap, the following behaviors were recorded by the server. Internal 500 error at first, redirection in a way the server can never process secondary (infinite loop syndrome).
Any help would be greatly appreciated, but since this is a personal site, rush assistance is not required. If you would like additional information about my setup, let me know and I can provide further details. Brain's burnt out for now.