Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 11:34:39 AM

Pages: [1]   Go Down
  Print  
Author Topic: problem with .htaccess file  (Read 15464 times)
zepo
Newbie
*
Offline Offline

Posts: 1


« on: April 21, 2011, 07:21:14 AM »

hello,

i have a problem with my .htaccess file, on my other server they works 100% perfect, support from lunarpages cant help me.
here is the code of my .htaccess file:

RewriteEngine On

ReWriteRule ^index.html$ index.php?content=index [L]

## CONTENT
ReWriteRule ^myusb/$ myusb/ [L]
ReWriteRule ^myusb/en/$ myusb/en/ [L]
ReWriteRule ^(.*?)/(.*?)/$ index.php?folder=$1&content=$2&%{QUERY_STRING} [L]
ReWriteRule ^(.*?)/$ index.php?content=$1&%{QUERY_STRING} [L]


AddHandler php5-cgi .php
AddHandler php4-cgi .php


folder is _myusb

must i anything change in the file for working on lunarpages server?

website with this htaccess file = http://www.myusb.de


Any suggestions?


Thanks in advance!


kind regards,
 zepo Help
« Last Edit: April 21, 2011, 07:38:18 AM by zepo » Logged
bitsum
Newbie
*
Offline Offline

Posts: 4


« Reply #1 on: June 07, 2011, 03:31:03 PM »

It might helped if you described what isn't working. Is the server failing completely? Are you having PHP issues?

The only thing that I can think of that might be different between two linux servers running Apache 2.x is the PHP interpretor configuration... Otherwise, they should behave identically. I am pretty sure mod_rewrite is installed on all Lunarpages servers, though you could encapsulate those clauses in <IfModule mod_rewrite.c> brackets. I'd guess the issue might be in the last 2 lines, though hard to say without knowing the symptoms. You may need to reference a different handler other than phpX-cgi... perhaps simply letting the system use its default PHP handler, instead of trying to force php-cgi.
« Last Edit: June 07, 2011, 03:38:48 PM by bitsum » Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Online Online

Posts: 5219



« Reply #2 on: June 07, 2011, 07:42:02 PM »

Without a RewriteCond statement, I'm not sure that those [L] flags are going to have any effect. I presume that you want to take care of a couple of special cases before going on to the more general patterns. Try adding RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain\.com  before the first RewriteRule and see if that helps. Any test that should always match would be OK.

By the way, in any pattern to be matched (second term in a RewriteCond, or first term in a RewriteRule), don't forget to escape literal periods: index\.html.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
Pages: [1]   Go Up
  Print  
 
Jump to: