Changing Code To Lighthttpd Htaccess From Apache

Jul 7, 2009

trouble with users mis-using hot-linking feature, so he wants some restrictions to b set via htaccess

He has given me a code which is used for htaccess in apache, but he wants this to work in lighthttpd, I am not sure if this would work in lighthttpd htaccess,

this was the code given to me to b worked on:

Code:
RewriteEngine on

RewriteCond %{HTTP_REFERER} !^$

#allow hotlinking for thumbnails
RewriteCond %{REQUEST_URI} !_thumb

#allowed website to hotlink (don't forget to add your own site !!)
RewriteCond %{HTTP_REFERER} !^[url]

#display no-hotlink.jpg instead of the requested image
RewriteRule .(jpg|jpeg|gif|png|bmp|ico)$ [url]

can any one help me for getting this code re-written for lighthttpd version htaccess file and where to enter this code -- using hypervm/kloxo on his vps

View 5 Replies


ADVERTISEMENT

Apache :: Cannot Find Right Redirect Code For HTAccess

Feb 26, 2013

For an unknown reason Google is generating url extentions on rich snippet pages. the most common one that I get it domain.com/?SD I would like to get rid of ?SD and redirect to domain.com or / is enough Now, I am unable to redirect using htaccess %{QUERY_STRING} , and a few other syntaxes did not work.

View 2 Replies View Related

.htaccess To Lighthttpd Rewrite

Sep 23, 2008

I had a .htaccess working in my previouse hosting. It is not working with the new hosting which has lighthttpd.

Can anyone help me to change my below htaccess modrewrite code to lighthttpd url rewrite? Its urgent please.

RewriteEngine On ...

View 4 Replies View Related

Convert .htaccess To Lighthttpd Rewrite Rule

Jun 5, 2007

How do I go about converting the follow .htaccess file

Code:
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} /blogs/(clientscript|images)/
RewriteRule ^(.*)$ $1 [L]

RewriteRule ^blogs/([-a-z0-9] )/([-a-z0-9] )-([0-9] )/comment-([0-9] ).html blogs/viewblog.php?username=$1&entrytitle=$2&entry=$3&c=$4 [QSA,L]
RewriteRule ^blogs/([-a-z0-9] )/([-a-z0-9] )-([0-9] )/feed/ blogs/syndication.php?entry=$3 [QSA,L]
RewriteRule ^blogs/([-a-z0-9] )/([-a-z0-9] )-([0-9] )/ blogs/viewblog.php?username=$1&entrytitle=$2&entry=$3 [QSA,L]
RewriteRule ^blogs/([-a-z0-9] )/category/([-a-z0-9] ).html blogs/viewblog.php?username=$1&categorydata=$2 [QSA,L]
RewriteRule ^blogs/([-a-z0-9] )/([0-9]{4})/([0-9]{1,2})/ blogs/viewblog.php?username=$1&month=$3&year=$2 [QSA,L]
RewriteRule ^blogs/([-a-z0-9] )/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2}).html blogs/viewblog.php?username=$1&month=$3&year=$2&day=$4 [QSA,L]
RewriteRule ^blogs/([-a-z0-9] )/archive.html blogs/viewblog.php?username=$1&displaymode=archive [QSA,L]
RewriteRule ^blogs/([-a-z0-9] )/feed/ blogs/syndication.php?username=$1 [QSA,L]
RewriteRule ^blogs/([-a-z0-9] )/ blogs/viewblog.php?username=$1 [QSA,L]
to work with lighthttpds rules?

View 2 Replies View Related

.htaccess Custom 404 Error Page Returning 200 Code

Aug 1, 2007

=The last line in the .htaccess file is
ErrorDocument 404 [url]

If someone tries to view a page that does not exist in the web site, the Custom 404 Error Page is displayed, properly.

I am trying to get Google to verify that I am the owner of this site (so I can use their Webmaster tools), and I have placed a page with a name they specified, in the site. Their verification fails, because, 'We've detected that your 404 file (file not found) error page returns a status of 200 (Success) in the header.' They need a status of 404 in the header of 404 pages. Note: Google does a HEAD request (not a GET request).

Also, I have noticed in the Webalizer statistics, there are no 404 codes listed with the other response codes! I know the Custom 404 page is getting a lot of hits, but, they are not shown in the statistics, because the wrong code is being sent.

The web site is small and the Custom Error page is with the other pages. I'm using MS FrontPage 2000.

Question: What do I need to change that line to, to get this to work properly, for Google and for my Webalizer statistics? Apache/1.3.27 (Unix)

View 10 Replies View Related

Changing .htaccess

Mar 29, 2007

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule !^index.php$ index.php [L]
</IfModule>

Hi,

This is my current .htaccess

As you see, it redirect all pages to index.php except index.php itsel

How do I modify it so that the exception is not just index.php but also channel.php or index3.php?

View 9 Replies View Related

Changing Register_globals From .htaccess Will Cause 500 Error When Php Run As CGI

May 7, 2007

Today I have a customer want to swich the register_globals on on his account ,,, i'm running PHPSuExec and running php as cgi not as Apache module , and as you know using php as cgi will cause internal error 500 if some one add php_flag register_globals on
to .htaccess file.

what is the soluation to switch register_globals on for his account only without using the .htaccess file.

put in mind the php files that need the register_globals to be on is encrypted with zend , so we does not have access to it for modification.

have any one have the solution?

View 3 Replies View Related

How To Deactivate Lighthttpd And Activate Apache

Jul 9, 2009

how to de-activate lighthttpd and activate apache?

my friend is having some problem in his vps so he wants to get back into apache interface...

he is using kloxo/hypervm interface

View 4 Replies View Related

Apache CustomLog - Status Code

Apr 14, 2009

if anyone can provide me with some syntax help for Apache 2 CustomLog.

Basicly. I want my CustomLog LogFormat to only log entries when the status code is either 200 or 304.

I've looked over [url]

I just can't figure out how to only log those 2 status codes.

View 0 Replies View Related

Invalid Response Code Received From Server Code: 451,

Jul 7, 2007

when I try to send Email from horde I have this:

PHP Code:

There was an error sending your message: Failed to add recipient: xxxxx@hotmail.com [SMTP: Invalid response code received from server (code: 451, response: Temporary local problem - please try later)] 

View 5 Replies View Related

Apache Has A Way To Insert Some Html Code Below <body> To Every Webpage

May 11, 2008

How to modify add some html code (such as banner, header, footer) to every webpage? without modify original files.

Under <body> or above </html> tags.

Something like search and replace.

View 5 Replies View Related

Apache :: Reduce Entries In AccessLog Based On Status Code

Aug 26, 2014

Basically I would like to record only certain status code entries in my access log. For example I would like to skip all entries with 200 status.

The documentation under "Modifiers" [URL] .... works somewhat but it still makes an entry in the AccessLog file.

This line in httpd.conf

View 9 Replies View Related

.htaccess Issue With Apache 1.3, But Works On Apache 2.2

Mar 22, 2008

I have the following Apache redirect code in .htaccess:

RewriteRule ^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$ /domain.com/app/modules/content/latestNews.php?id=$1 [L]

This redirect works fine on Apache 2.2.8, but doesn't work on Apache 1.3.41

The following is the entry from error_log:
RewriteRule: cannot compile regular expression '^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$'

A simple Rewrite is working fine in Apache 1.3, but the above regualar expression doesn't seem to be working on Apache 1.3. Does anyone know whether Apache 1.3 doesn't support it?

View 3 Replies View Related

Apache - Changing Requested URL

Sep 4, 2009

Need to make requested URL - remove "//pdf" off the end.

Thought:

If //pdf exists in the URL - remove it.

Thought it would be something like belowe added to the httpd_conf file but not sure.

RewriteRule ^//pdf / [R]

View 2 Replies View Related

Apache :: Changing DNS Settings

Dec 10, 2012

I am running a web server (Apache 2.2) on a (production)windows 2008 server. I am encountering a little trouble. I have the domain wheatondev-uk.com pointing to this (production) server. This works fine. I have another domain hosted on another(developement) server. This is domain is wheaton-uk.com I want to have the domain wheaton-uk.com point to the production server. However when i change the DNS settings at network solutions by that I mean i change the settings of wheaton-uk.com to point to the IP of the production server...it times out when trying to go to wheaton-uk.com. If I switch them back to the original DNS settings, all the domains load up fine. I feel like this is an apache thing and I need to change something in the conf files.

View 1 Replies View Related

Changing LimitRequestLine In Plesk Apache Configuration

May 16, 2014

I have to modify the two apache settings LimitRequestLine and LimitRequestFieldSize. Strangely, the setting has to be made to the first VirtualHost that gets loaded and it will then be changed for all virtual hosts. I don't understand why that's the case, but I was able to verify it works on a local test server.

But how do I find out which virtual host is loaded first? I tried with default of course, but that one isn't it.

Or how to make the setting to apache?

I run Plesk Panel 11.5 on Debian 7

View 2 Replies View Related

Set Apache Handler Through .htaccess - Possible?

Jun 2, 2007

I am running into a bit of a problem. Previously, I can add an apache handler through cPanel easily... but now I moved to mediatemplate.net and that feature isn't available on their contol panel. Since they also run apache, I figured that I can set the apache handler manually through an .htaccess file - is that possible? If so, what is the syntax that will enable me to set .html files to be handled like .php files?

There is one setback to this process - this will be a manually inserted file for every directory that I want to do the above stated file handler. Is there an easier way to do this via SSH? I don't have root access, only normal user access.

View 3 Replies View Related

How Enable Htaccess On Apache?

Jun 2, 2009

Hi Htaccess not working in my server how Enable htaccess on Apache ?

View 14 Replies View Related

Htaccess Not Work On Apache

Nov 3, 2009

im installing APACHe on windows server 2003 but .htacess not work on apache

View 4 Replies View Related

Apache :: HTAccess - How To Do URL Rewrite

Oct 23, 2014

I have been trying to figure out how to do a url rewrite but no luck so far.

How can I have this [URL] ....

as the default [URL] ....

View 2 Replies View Related

Apache :: How To Use HTAccess And HTPasswd

Jan 26, 2014

I am have trouble using .htaccess and .htpasswd to password-protect a directory on my web server. How do I use .htaccess and .htpasswd to protect a directory?

View 3 Replies View Related

Apache :: Redirect URL Using HTAccess

Jul 17, 2013

I have a website. I would like to redirect all user/author url to one author/admin...e.g All aurthor links to redirect to one author link

author 1. mysite (dot) com/author/x
author 2. mysite (dot) com/author/y
author 3. mysite (dot) com/author/z
they are about 300

I would like all of them to redirect to author 2. mysite (dot) com/author/admin.

View 3 Replies View Related

Apache :: What Is HTAccess File

Jan 31, 2013

what is .htaccess file? use of this file?

View 6 Replies View Related

Apache :: URL Remapping With HTAccess

Jan 25, 2013

I have a directory of /flash/1.swf all the way to /flash/4000.swf on my hosting.I am trying with terrible luck to load the flash movies into the container on zomgflash dot com(avoiding possible spam) -- its all setup...it should be loading the movies...I think it's a mod_rewrite problem but I could be wrong...it's basically a clone of iwantmoar dot com(avoiding spam again) -- you'll notice when you type a number after the domain like /238 or /2898 that it loads up /flash/238.swf or /flash/2898.swf into the flash container on the iwantmoar website. That's what I'm trying to get my website to do.

I need them shown like [URL] .... in the address bar... and that would have index.php load up 1.swf in the container if that makes more sense.This is the contents of my .htaccess from my relentless googling:

<IfModule mod_rewrite.c>
Rewrite-engine on
RewriteRule ^([0-9]+)$ /index.php [PT]
</IfModule>
ErrorDocument 404 /index.php

View 1 Replies View Related

Malformed Htaccess Kills Apache

Jun 13, 2007

Does anybody know any solution to prevent this?

Basically every customer can bring server down with malformed htaccess.

Is there any solution to prevent this?

This doesn't help:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteOptions MaxRedirects=5
</IfModule>

this htaccess causes problems:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

View 6 Replies View Related

Apache :: Mass 301 Redirect HTAccess

May 11, 2013

I've not seen an answer for this mass 301 redirect issue specifically.. How to do this...

category/brand URLs:

redirect: /ID-some-brand (e.g. /43-religion-clothing or /26-ichiban) to: /some-brand (e.g. /religion-clothing or /ichiban)

Product URLs:

redirect: /some-category/ID-some-product-name.html (e.g. /mens-sweat-shirts/1543-ichiban-fairly-offensive-sweat-in-grey.html)

to: /some-product-name (e.g. /ichiban-fairly-offensive-sweat-in-grey)

We have 1,090 products and 60+ categories so some form of .htaccess trick would be amazing to know. What I could put in the .htaccess to accomplish this.

View 1 Replies View Related

Apache :: HTAccess Redirect Loop

Jan 25, 2014

Well, I was trying to use the following in htaccess, but I get the message of redirect loop.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1 [L,QSA]

What I want to do is this: The URL is like somedomain.sub.com/somepage/s1/s2The index.php is accessible from somedomain.sub.com/somepage/I want to send s1/s2 as $_GET['page']

Also, I don't want the URL in the address bar to change, only the url sent to the server should change. This worked well in my localhost, but on webserver (0fees.net), it doesn't work ...

View 1 Replies View Related

Apache :: HTAccess Wildcard Subdomains

Jul 11, 2015

I have viewing the city names in my website like the following structure - [URL] ....

Here is the ,htaccess code - RewriteRule ^([^/]*)/([^/]*)/$ city.php?state=$1&city=$2 [NC]

But actually, I'm looking for to use wildcard subdomains that will rebuild the city names like the following structure-
city.mydomain.com/state/

I just need the htaccess rewrite code. 

View 1 Replies View Related

Apache :: HTAccess Needs For Rule To Redirect

Feb 21, 2013

I have page like that : [URL] ....

I want to permanent redirect it to : [URL] ....

Also needs to redirect all another page have words ( rates ) to index.

View 9 Replies View Related

Apache :: Removing PHP For One File Only In HTAccess

Jun 11, 2014

I'd like to change /comp.php to /comp but I have only found articles on how to remove .php completely and I don't want to do that, only want to do it for this one file.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved