.htaccess tutorial

htaccess Elite


Re: where to put redirected page to serve

Ask your mod_rewrite and Redirection questions here, and get answers!

Re: where to put redirected page to serve

New postby neetika » 28 Nov 2006 08:11

hey I tried this but it is not redirecting me to that page

I types http://192.168.0.100:80/testht.html

rather the testht.html page is showing up than errr.html

Do I need to do some more changes in httpd.conf file



here is my code where I did changes to Directory directve and files



<Directory "C:/Program Files/apchtst">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.0/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#earlier it was None but now its limit
AllowOverride None

#
# Controls who can get stuff from this server.

Order allow,deny
allow from all

<files "testht.html">
Order allow,deny
Allow from All
deny from 192.168.0.101
ErrorDocument 403 errr.html
</files>


</Directory>


Note: I put my errr.html page under "C:/Program Files/apchtst"
so apchtst directory will be having 3 pages
testht.html
testht2.html
errr.html

I want to show errr.html page when a blocked ip addresses tries to see testht.html.

Not all allowed user showed be able to see this errr.html page.

Meanwhile I will try to put htis errr.html page in different forlder and tried to serve.

Thanks(your response gave me energy to do the things)
Neetika
neetika
 
Posts: 7
Joined: 28 Nov 2006 06:59

New postby produke » 28 Nov 2006 08:13

Code: Select all
AllowOverride Options AuthConfig

<Files testht.html>
Order allow,deny
Allow from All
deny from 192.168.0.102
ErrorDocument 403 /err.html
ErrorDocument 401 /err.html
</Files>


Ok try that. If it still isn't working than its because you are using WINDOWS. And then you should go check out the windows Apache forum http://www.apachelounge.com/

That site is where you should go and ask your questions, I'm just not familiar with running Apache on Windows nor do I recommend it.
User avatar
produke
 
Posts: 242
Joined: 25 Sep 2006 04:48

New postby neetika » 28 Nov 2006 17:54

Hey It worked for external URL like http://google.com
Now I am trying to fetch the page within a local environment.
neetika
 
Posts: 7
Joined: 28 Nov 2006 06:59


Return to Redirect or Rewrite Questions