Forum Moderators: phranque
I have a directory on my site named "eControl" and inside of this directory is the file named "index.php" which is what all url's should land on.
For example, anyone who goes to "http://www.domain.com/eControl/documents/list/new/" would be redirected to "http://www.domain.com/eControl/index.php?1=documents&2=list&3=new"
Here is my code:
RewriteEngine on
RewriteRule ^eControl/?$index.php[QSA,L]
RewriteRule ^eControl/([-A-Za-z0-9]+)/?$ index.php?section=$1 [QSA,L]
RewriteRule ^eControl/([-A-Za-z0-9]+)/([-A-Za-z0-9]+)/?$ index.php?section=$1&action=$2 [QSA,L]
RewriteRule ^eControl/([-A-Za-z0-9]+)/([-A-Za-z0-9]+)/([-A-Za-z0-9]+)/?$ index.php?section=$1&action=$2&actionID=$3 [QSA,L]
I put the .htaccess file in the root "http://www.domain.com/" and the page I want to serve is "http://www.domain.com/index.php".
Thanks for the help.
It doesn't work because no matter the url's I try, they should always go back to the "/eControl/index.php" page. So when I try these it should work:
/eControl/document/list/new
/eControl/document/list/
/eControl/document/
Instead, I go to a 'page not found' error. I don't think that I have access to the log files.
http://example.com/eControl/ (works fine)
http://example.com/eControl/document/list/ (does not work)
However, you can see a different error (a 404) by going here:
http://example.com/eControl/document/list/page.php
So it seems that this rewriterule is not even doing anything.
THanks.
[edited by: jdMorgan at 9:04 pm (utc) on Nov. 18, 2007]
[edit reason] example.com [/edit]
Do you have any rules in that file that work?
Have you tried something simple, like
RewriteRule ^foo\.html$ [google.com...] [R=302,L]
Does anything show up in your error logs pertaining to these requests?
Jim