Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-25-2004, 10:16 PM
|
#1
|
|
Member
Registered: Jun 2003
Distribution: Redhat
Posts: 87
Rep:
|
Mod_rewrite question
Hi all,
I load mod_rewrite on the httpd.conf file. Now, how do I test to see if it work correctly?
Thanks
|
|
|
|
02-25-2004, 10:55 PM
|
#2
|
|
Senior Member
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658
Rep:
|
Put in a rewrite rule in the httpd.conf file:
RewriteEngine on
ReWriteCond condition to match here
ReWriteRule what you wanna do here
|
|
|
|
02-22-2006, 10:11 PM
|
#3
|
|
Member
Registered: Mar 2003
Distribution: redhad 7.3
Posts: 42
Rep:
|
where would be the right place?
I've always done Rewrite rules inside virtuls. but this box doesn't have (or need) any. so where do I put the rewrite rules? thanks.
|
|
|
|
02-22-2006, 10:22 PM
|
#4
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,084
Rep: 
|
One of the examples in the docs at http://httpd.apache.org/docs/2.0/misc/rewriteguide.html has the following (I've removed the comments):
Code:
UseCanonicalName on
CustomLog /path/to/access_log "%{VHOST}e %h %l %u %t \"%r\" %>s %b"
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:/path/to/vhost.map
RewriteCond %{REQUEST_URI} !^/commonurl1/.*
In other words, in Section 2 of httpd.conf - the 'Main' server configuration.
|
|
|
|
02-23-2006, 12:28 AM
|
#5
|
|
Member
Registered: May 2004
Location: Vancouver, WA
Distribution: Xubuntu, Debian, Slackware
Posts: 118
Rep:
|
You can also throw them into an .htaccess file for easier editing access than in httpd.conf
|
|
|
|
02-23-2006, 11:03 AM
|
#6
|
|
Member
Registered: Mar 2003
Distribution: redhad 7.3
Posts: 42
Rep:
|
Thanks
I threw it into the <directory> it accepted the actual Rewrite rules and Rewrite on, but I had some rewrite log configurations and log level and it said they can't be there. and needless to say it did nt work.
I've always been told that putting it in the server conf is way more efficient, and also that .htaccess files are more error prone but I'm totally OK with using .htaccess on the dev box. For me it is much of a muchness. I own the colo server where there are virtuals, and the dev box where there arent.
|
|
|
|
| Thread Tools |
Search 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
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:24 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|