LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 09-04-2011, 08:50 PM   #1
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Rep: Reputation: Disabled
my mod_rewrite function won't work


HI good day, just want to ask why my mod_rewrite is not working. i'm redirecting my site to my new front page.

my mod_rewrite is activated in LoadMdule, i can't understand why it is not working.

here's my code:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^/home/leo/dwcc/etc/dwcc\.html$ /home/leo/dwcc4/dwcc.html [R]
</IfModule>

please help me wat's wrong.

and also our old site is run by cgi, is there something to do with it?
 
Old 09-05-2011, 01:52 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Enable logging of what mod_rewrite does with http://httpd.apache.org/docs/2.0/mod...tml#rewritelog. This may shed some additional light.
Also I doubt that your rewrite rule is correct cause they normaly handle URL's and not pathes but I might be wrong there.
 
Old 09-05-2011, 01:52 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Just a thought, haven't gone through everything yet but the first thing that comes to mind is that you didn't put a 'L' at the end of your rule. I'm not a mod_rewrite expert at all so please correct me if I'm wrong but I thought that the last rule must have an L to indicate it being the last one so that the rewrite engine can process.

Kind regards,

Eric
 
Old 09-05-2011, 08:08 PM   #4
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
Erictra, thanks for the reply. but how can i write it correctly?. .
 
Old 09-06-2011, 01:27 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

At the end of your rule, where you have:
Code:
[R]
change to
Code:
[R,L]
and try again.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mail() function doesn't work with HOTMAIL but its work with others ramzaher Linux - Newbie 1 04-27-2011 06:55 PM
why won't my collision detection function not work? Quargar Programming 6 11-28-2009 02:34 AM
Function keys on Inspiron 1501 won't work on Kubuntu Feisty checho4 Linux - Laptop and Netbook 3 09-03-2007 02:00 AM
mod_rewrite or php error...some rewrites work, some dont. rmwebs Linux - Server 2 01-02-2007 03:04 PM
mod_rewrite script doesn't work. Travis86 Linux - Networking 0 04-10-2004 09:45 PM


All times are GMT -5. The time now is 01:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration