LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-12-2003, 08:25 PM   #1
Modify
Member
 
Registered: Nov 2003
Distribution: Debian 3.0r1
Posts: 55

Rep: Reputation: 15
Apache & mod_rewrite


Looked around on the forums here, along with the mod_rewrite help at apache.org, and couldn't seem to get it working. RTFMing doesn't help when you're a true newbie :\

Anyway, I have my site(s) running off my local computer. The trailing slash thing is rearing its ugly head though, so that http://penance.no-ip.org/~modify throws an error, but http://penance.no-ip.org/~modify/ does everything right.

I'd like to have it setup so that apache automatically adds slashes to the end of the relevant parts of everything, but all the stuff I've read seems to be geared towards doing so for a certain directory.

/--08:18 PM
\--root@penance:/etc/apache$ apache -v
Server version: Apache/1.3.29 (Debian GNU/Linux)
Server built: Nov 5 2003 18:49:32


I tried to include the following into my httpd.conf:
Quote:
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.htm index.shtml index.cgi
</IfModule>
RewriteEngine on
RewriteBase /
RewriteRule ^$ / [R]
#
# AccessFileName: The name of the file to look for in each directory
# for access control information.
When I try an apachectl configtest though, i get:

Quote:
/--08:11 PM
\--root@penance:/etc/apache$ apachectl configtest
Syntax error on line 363 of /etc/apache/httpd.conf:
RewriteBase: only valid in per-directory config files
Any help on setting this up to automagically work for every directory both already created and those made in the future without needing to re-visit httpd.conf would be greatly appreciated (:
 
  


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
Apache mod_rewrite problems compu73rg33k Linux - Software 0 11-27-2005 09:42 AM
Apache Mod_rewrite help! soulsniper Linux - Software 0 01-16-2005 05:23 PM
Apache:mod_rewrite MadMikie Linux - Software 0 08-03-2004 07:33 AM
Apache mod_rewrite not working? KillerCheeto Linux - Software 2 05-23-2004 10:26 PM
Apache and mod_rewrite notsoevil Linux - General 0 01-23-2002 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:03 AM.

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