Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th June 2006, 17:58
stenzlem stenzlem is offline
Junior Member
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem getting mod_rewrite to work

I am trying to get mod_rewrite to work on my server. I'm using Apache 2.0 with Red Had Linux. I developed some rules on my dev box that worked fine, but when I tried modifying my live server, it was not even attempting to apply the rewrite rules.

I tried making a very basic rule just to see the rewrite work on my live server with:

LoadModule rewrite_module modules/mod_rewrite.so

RewriteEngine on
RewriteLog logs/rewrite
RewriteLogLevel 9
RewriteRule ^/foobar/$ /newfoobar [PT]

and it does not write anything to the rewrite log nor does it rewrite the url. It just gives me a 404 error in the error log because /foobar does not exist.

There are no other references to RewriteEngine in any of the conf files. Any help on why this is not working would be much appreciated!

-Mike
Reply With Quote
Sponsored Links
  #2  
Old 15th June 2006, 15:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,083
Thanks: 826
Thanked 5,397 Times in 4,241 Posts
Default

Do you insert these rules in the vhost or in an htaccess file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 15th June 2006, 19:03
stenzlem stenzlem is offline
Junior Member
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
Do you insert these rules in the vhost or in an htaccess file.
I inserted it in the http.conf file before any of the virtualHost directives.

-Mike
Reply With Quote
  #4  
Old 16th June 2006, 02:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

You must put

Code:
RewriteEngine on
RewriteLog logs/rewrite
RewriteLogLevel 9
RewriteRule ^/foobar/$ /newfoobar [PT]
into the virtual hosts, otherwise it wil work only for the server's main web site.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
Strange email problem for one of my domains... any help appreciated paulrobert_a Installation/Configuration 5 9th August 2010 14:15
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
URGENT Web_ problem itgroup Installation/Configuration 11 12th August 2006 17:23
Postfix not accepting mail heff Server Operation 13 20th March 2006 12:42


All times are GMT +2. The time now is 04:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.