.htaccess versus httpd.conf www/non www

From the Apache site:
http://httpd.apache.org/docs/2.2/howto/htaccess.html

One should generally avoid using the .htaccess file mainly due to performance hits. They instead directives should be placed in the http.conf file.

I'm using the domain module and have a few domains. I am trying to redirect any example.com to www.example.com and all I have read here and found so far is about using this block in the .htaccess (from a google engineer post):

Drupal does not link to its index.php file so the third URL example is generally not an issue with Drupal. However you should choose between using the www version of the domain name or the non-www version of the domain name. Drupal makes this easy by providing instructions in the default .htaccess file as shown below:

# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

Client hosting being upgrade from MySQL 4 to 5.1 - anything I need to do?

An older client site (D6) is on hosting that will upgrade from the current MySQL 4 to MySQL 5.1. Is there anything I need to do Drupal-wise to prepare?

Report user session length

Hello all,
First, excuse me if I post in the wrong section.
I made search but did not find a valuable answer.
My issue is the following : I have to make some users oriented reports on an existing Drupal website (Drupal v6.x). One of the most needed data is the users sessions duration.
I enabled the statistics core module so the accesslog table is filled with users' actions, OK for that. Embedded reports provide some info but I will have to build my own in order to fill the requirements.
I am completely new in the Drupal world. Maybe I did not look at the right place but I did not find :

  • a simple way to build my own report
  • a report showing session duration for each user

So I guess I have to make my own reports :
Of course, logging sessions durations is not easy for a website. I guess I will have to change the site's settings.php file (ini_set('session.cookie_lifetime', 600);) for session timeout after 10 minutes idle, for example. Then I will make my own SQL requests and compute sessions duration with login and logout timestamps. This leads me to the following two issues :

  • when a session times out, does it generate an entry in the accesslog table for this user or is it done only for "manual" logout (when the user clicks on the logout button) ?

No Result if Only One Record Returned in db_fetch_object

Using a custom content with php input on a panels page. I have the following code in the body field of custom content using php input format.

how to give breadcrumbs through views

i am displaying some content with views under some menu.
but breadcrumb is not coming for these pages, even menu title also not coming in breadcrumb.

I used custom breadcrumb also but not working.
in some forum it is written that we can pass breadcrumb through argument in views.
if that so, can someone give me details to do that... please..
Thanks

Too many switch statements...

Hi everyone!

In the following code, I'm getting a value from a select field, test the value in a switch statement and assign it to a variable. The values are then outputted in a table.

I want to output the value of 14 more fields which makes for an awful lot of variables and switch statements and got the feeling that this isn't the most efficient way to go about, but I'm not a PHP developer... Would be very grateful if someone could point to me a better way of doing this.

Many, many thanks in advance.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 6.x