Welcome to HostingForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

mod_rewrite

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Related Topics:
mod_rewrite example? - I've been looking through the info from here: I still dont how to make something like the Get rewritten to say:..

help please about mod_rewrite - Hello...i needed about to redirect all user something like to using an .htacces file with the following code but it doesn't work! Can anyone help me? file .htacces contents ..

mod_rewrite directory - Hi, I am using to re-direct all requests to a directory to a .php script using a set of commands similar to: on These reside within a..

Mod_rewrite Problems - Hey All, I am running a Fedora Core 3 server, with and PHP/ 4.3.11, with each user having their own folder under the server (ie '/ = I am trying to get the module to work for me...

mod_rewrite on AppServ - I am using: AppServ 2.5.9 (Apache 2.2.4 PHP 5.2.3 MySQL 5.0.45 CakePHP I need to configure Apache to use pretty URLs like: The CakePHP manual says: sure that an..
Next:  Domain name transfer question  
Author Message
CptDondo

External


Since: Jul 04, 2005
Posts: 11



(Msg. 1) Posted: Wed Feb 27, 2008 2:05 pm
Post subject: mod_rewrite
Archived from groups: alt>apache>configuration (more info?)

I'm using a client side redirect that I would like to change to server
side. Right now I am using this bit of php to redirect if the user agent
is not lftp.

<?php
$ref = $_SERVER["HTTP_USER_AGENT"];
if (strncmp($ref,"lftp",4) != 0) {
header( "Location: http://new.location.com/some/page" );
}
exit( 0 );
?>

What I would like is to to redirect everything coming from outside my lan
(192.168.128.0/24) , wan (10.10.0.0./16), and not using lftp. I want it
to work for any subdirectory as well.

I've included this in my vritual host file but it doesn't work; I still
get indexes if I go directly to the images directory or to any
subdirectories below it.

<Location /blog/Travels/images/>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^192\.168\.128\.*
RewriteCond %{REMOTE_ADDR} !^10\.10\.*
RewriteCond %{HTTP_USER_AGENT} !^lftp*
RewriteRule .* /blog/Travels
</Location>

 >> Stay informed about: mod_rewrite 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]