SunQuest
 
           Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old October 26th, 2005, 05:34 PM
kevinridge kevinridge is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 4 kevinridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 53 m 56 sec
Reputation Power: 0
Exclamation Help with .htaccess

Hello,
I know that you can use .htaccess with windows apache server. I got the htaccess to work too but having a wierd problem with .htaccess redirection.

Here is the problem:

My htaccess file:
redirect / http://google.com

Website:
http://127.0.0.1:81/kevin

This should redirect to google but when i go to the page, its redirects to http://google.comkevin/

Do you guys know what to do. I am clueless about this error.

Thanks,
Kevin

Reply With Quote
  #2  
Old October 27th, 2005, 08:24 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
There's a chance Apache isn't even reading the htaccess file.
Have you enabled htaccess in the httpd.conf? AllowOverride All

Reply With Quote
  #3  
Old October 27th, 2005, 03:41 PM
kevinridge kevinridge is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 4 kevinridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 53 m 56 sec
Reputation Power: 0
Hey,
Thanks for replying. I did set that but i still get the same thing. I am a novice at htaccess with apache, if someone could please led me through it, it would be great.

I tried reading on apache htaccess, but i dont know, its not working.

Reply With Quote
  #4  
Old October 28th, 2005, 04:43 PM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
kevin this is an easy error to fix. first off you don't need your ipaddress or any form of the address within the script. you have part of it right but this is the best way to achieve the results you're seeking. these two lines will work

redirect /index.hml http://www.google.com/
or
redirect / http://www.google.com/

your best bet would be to put your index page within the script, so if your main index page is kevin.php put that following the foward slash / and then the address to google.

there it should work.
__________________
Apache Expert

Reply With Quote
  #5  
Old October 28th, 2005, 08:14 PM
kevinridge kevinridge is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 4 kevinridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 53 m 56 sec
Reputation Power: 0
ok it still doesn't work :-(

redirect /index.hml http://www.google.com/ = Just Doesn't redirect at all

redirect / http://www.google.com/ = Redirects to http://google.com/kevin

Reply With Quote
  #6  
Old October 29th, 2005, 02:09 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
do you have htaccess enabled as madcowdz suggested? also what operating system are you running?

Reply With Quote
  #7  
Old October 29th, 2005, 10:25 AM
kevinridge kevinridge is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2005
Posts: 4 kevinridge User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 53 m 56 sec
Reputation Power: 0
Hello,

Yes i do have AllowOverride All and i am running on windows XP. Let me post my apache conf htaccess part.

Part 1:
Code:

# 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
#
    AllowOverride All
#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>


Part 2:
Code:
#
# AccessFileName: The name of the file to look for in each directory
# for access control information.  See also the AllowOverride directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>


Thats all i could find about htaccess. Any idea? I could paste more if you want.

Thanks!

P.S. I noticed something else. when i do:

redirect /kevin/hello http://google.com

It doesn't redirect all at - not even to http://google.comkevinhello

Reply With Quote
  #8  
Old November 2nd, 2005, 04:54 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
that's funny, because on my windows server i have apache installed and tried this code, and i was sent straight to google.com when i ran it on my server.

what version of apache are you running on your xp machine?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > Help with .htaccess


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway