LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2005, 06:25 PM   #1
jfall
Member
 
Registered: Oct 2002
Location: PEI
Distribution: Slackware
Posts: 56

Rep: Reputation: 15
mod_rewrite problem


I have a set of re-write rules that work fine in a .htaccess, but I need to place them within the apache virtual host for this particular domain instead.

When I put the same rules in the virtual host, I get a 400 bad request error. Are there difference between re-write rules when used within a virtual host rather than a htaccess file?

This is what I am using:

RewriteEngine ON
RewriteRule ^(.*)/([0-9]+)/index.html$ article.php?id=$2 [L]
RewriteRule ^tools/(.*)$ getPage.php?page=tools/$1 [L]
RewriteRule ^([0-9]+)/$ article.php?id=$1 [L]
 
Old 02-22-2005, 07:05 PM   #2
jfall
Member
 
Registered: Oct 2002
Location: PEI
Distribution: Slackware
Posts: 56

Original Poster
Rep: Reputation: 15
n/m figured it out. Had to put it within directory tags
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod_rewrite install problem gobrien Linux - Newbie 1 06-04-2005 04:30 PM
Problem installing mod_rewrite gobrien Linux - Software 0 06-03-2005 09:07 AM
Apache:mod_rewrite MadMikie Linux - Software 0 08-03-2004 07:33 AM
mod_rewrite & regex problem webmeister Programming 2 12-30-2003 11:19 AM
Apache and mod_rewrite notsoevil Linux - General 0 01-23-2002 01:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration