Problems, need help? Have a tip or advice? Post it here.
9 posts Page 1 of 1
Firstly, i'm a noob in '.htacces' files. Please someone help me step by step, in enabling the prettyURLs.

Secondly, I have requested my Webhost to enable mod_rewrite and it has been activated.

Now i'm stuck on how to check whether its activated or not. I have been trying to go in the 'test_rewrite' folder option provided by the Moderator KK, and that 'rewrite.php' is not loading anything. A blank white screen is coming. I've correctly placed the test_rewrite folder in my public_html, and then loading 'www.example.com/couch/test_rewrite/rewrite.php' and a blank screen is coming.

I have made the change in 'config.php', that is, i have set K_PRETTY_URL to 1.
Still Nothing is happening.

How to move forward?
Please someone help me out.

PS: is a default '.htaccess' file provided by my host and does it automatically stay inside my public_html?

PS: I have deleted any '.htaccess' file present inside my public_html beforehand and then proceeded with the 'test-rewrite' process which i have mentioned above.

Please someone help me out.
Thank you in advance.
Hi,

Let us disregard the test_rewrite thing for the moment and assume that prettyURLs are indeed available on your server.

With that assumption, please try following the two steps given in the docs - http://www.couchcms.com/docs/concepts/pretty-urls.html

You have already taken the first step (made changes to the config file). Now you also need to generate a .htaccess file as described in the docs.

Place the generated .htaccess file in your site's root and let us know how it goes.

Thanks.
KK wrote: Hi,

Let us disregard the test_rewrite thing for the moment and assume that prettyURLs are indeed available on your server.

With that assumption, please try following the two steps given in the docs - http://www.couchcms.com/docs/concepts/pretty-urls.html

You have already taken the first step (made changes to the config file). Now you also need to generate a .htaccess file as described in the docs.

Place the generated .htaccess file in your site's root and let us know how it goes.

Thanks.


Sir, I have done that and it is not showing anything in the browser. I have visited, 'www.example.com/couch/gen_htaccess.php' and a blank page is coming.

I'm not sure what to do next.

My gen_htaccess.php inside 'couch' has this content:

<?php
/*
The contents of this file are subject to the Common Public Attribution License
Version 1.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.couchcms.com/cpal.html. The License is based on the Mozilla
Public License Version 1.1 but Sections 14 and 15 have been added to cover use
of software over a computer network and provide for limited attribution for the
Original Developer. In addition, Exhibit A has been modified to be consistent with
Exhibit B.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License.

The Original Code is the CouchCMS project.

The Original Developer is the Initial Developer.

The Initial Developer of the Original Code is Kamran Kashif (kksidd@couchcms.com).
All portions of the code written by Initial Developer are Copyright (c) 2009, 2010
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of the
CouchCMS Commercial License (the CCCL), in which case the provisions of
the CCCL are applicable instead of those above.

If you wish to allow use of your version of this file only under the terms of the
CCCL and not to allow others to use your version of this file under the CPAL, indicate
your decision by deleting the provisions above and replace them with the notice
and other provisions required by the CCCL. If you do not delete the provisions
above, a recipient may use your version of this file under either the CPAL or the
CCCL.
*/

ob_start();

if ( !defined('K_COUCH_DIR') ) define( 'K_COUCH_DIR', str_replace( '\\', '/', dirname(realpath(__FILE__) ).'/') );
require_once( K_COUCH_DIR.'header.php' );
header( 'Content-Type: text/html; charset='.K_CHARSET );

define( 'K_ADMIN', 1 );

//$DB = new KDB();
$AUTH = new KAuth( K_ACCESS_LEVEL_ADMIN, 0 );


echo $FUNCS->generate_rewrite_rules();




I put this up as i thought this might help in debugging my problem.

1. Am i missing some lines? Is my gen_htaccess.php content correct?
2. Should there be a default '.htaccess' file in my host's public_html?( I dont have any.)

Please help me out.
Thank you in advance.
I have visited, 'www.example.com/couch/gen_htaccess.php' and a blank page is coming.
That can happen only when you try to access the page as a non-admin.

Please first login into Couch admin-panel as admin using a browser. In the same browser tab tweak the URL shown in address bar to point to gen_htaccess.php. This way you'll be sure to be accessing the script as admin.
KK wrote:
I have visited, 'www.example.com/couch/gen_htaccess.php' and a blank page is coming.
That can happen only when you try to access the page as a non-admin.

Please first login into Couch admin-panel as admin using a browser. In the same browser tab tweak the URL shown in address bar to point to gen_htaccess.php. This way you'll be sure to be accessing the script as admin.


Just manages to get the contents of gen_htaccess.php.

The thing is, my Hosting Provider, Arvixe, was telling me that they have activated mod_rewrite, but actually they did'nt.

today they gave me a code which i put in the .htaccess file under my public-html and now the gen_htaccess worked!

I copied the code and added it to my .htaccess and the Pretty URLs have been successfully enabled!

A
Thank you KK, anyways.
:D
I'm glad to be of assistance, @Samarpan :)
This same issue has cropped up a few times on the forums @KK. A blank white screen is confusing... Perhaps it would be worthwhile to output some type of message for gen_dump and gen_htaccess when visited with insufficient access (not logged in)?
I agree, @cheesypoof.
I'm not keen on showing a login box or a link to the admin-panel (security concern.. perhaps paranoid) but I think a simple message asking to login as admin should be helpful. What do you say?
Yes, a simple message should suffice. We wouldn't want to introduce a way to circumvent admin page renaming.
9 posts Page 1 of 1