Forum for discussing general topics related to Couch.
12 posts Page 1 of 2
Hi All,

I'm trying to enable Pretty URL's but when I follow the docs and:

Generate my htaccecss file, set the config to "1" for pretty urls

All I get ins internal server error.

The site is in it's own subdomain i.e. site.mydomain.com so:

Code: Select all

#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it RewriteBase /subdomain1/subdomain2
RewriteBase /


Is left as is above and below I have my config set to:

Code: Select all
   define( 'K_SITE_URL', 'http://site.mydomain.com/' ); 


I've tried commenting out the above and still get the same error.

Host is Blacknight, it's in it's own webspace (shared account). Mod Rewrite is enabled on the server because other sites on our shared account work fine i.e. Wordpress sites.
Hi Patrick,

Please try removing the following first line from the generated .htaccess
Options +Indexes +FollowSymlinks -MultiViews

If this does not help, try taking a look at your web server's error log. That is sure to give us the exact reason for the error.
Hi KK,

Removing that line worked a treat! I will remember that in future.

Is it possible to add in to the htaccess a rule that removes the .html? or any extension for that matter?
Is it possible to add in to the htaccess a rule that removes the .html? or any extension for that matter?

It'd seem that we could manually edit the .htaccess file to modify the rules, however, Couch has a feature (not sure if you noticed it yet) that would cause our effort to fail - on every page access, Couch compares the URL used to access the page with the page's 'canonical' (could be pretty or otherwise depending on the current configuration) URL.

If it finds that the two do not match, it redirects the visitor to the 'correct' URL (using HTTP 301 code). This is great for SEO but will also not allow us to use custom URLs (at least not as yet - I do have plans to let the URLs be configurable).
Hi KK,

Thanks for the explanation, for now I'll leave it as is then - I look forward to been able to do it in a future release ;)
I am getting a 500 Internal Server Error, also tried the test_rewrite file that say that the mod_rewrite is not set.

I then contacted my hosting provider and their reply was that I can set it to on myself in the .htaccess file?

Any advice on how to do that?
@madebym,
Please try *replacing* the default first line with the following (try the first and then the second) -
Code: Select all
Options +SymLinksIfOwnerMatch -MultiViews
Code: Select all
Options -MultiViews

If neither of them do the trick, please take a look at your web-server's error log (can be accessed from your CPanel) and let us know what it is complaining about.
@KK

Didn't worked for both options, still the 500 error.

Judging from error logs, here are the two repeated complaints, the second one only appeared once in the error logs.

Illegal option MultiViews<IfModule
<IfModule takes one argument, Container for directives based on existence of specified modules
OK, so I assume you have already tried the very first option mentioned in this thread i.e.
try removing the following first line from the generated .htaccess
Options +Indexes +FollowSymlinks -MultiViews

What happens when you remove that line altogether? What does the error log report?
Here is the log when I delete the first line from .htaccess

<IfModule takes one argument, Container for directives based on existence of specified modules


From googling that error, it seems that it may be in relation to syntax errors in the .htaccess

From stackoverflow:

Also, make sure the line endings in your .htaccess file are set appropriately. Apache can sometimes choke on anything that doesn't include the new-line (\n) character.
12 posts Page 1 of 2