mod_rewrite rule from window, now in linux not working
Hello friends,
Well my website was hosted on a windows machine but now I moved to Linux. The problem is that my rewrite rule is not working here .. Please can anybody tell me what changes I need to make here to make it work on Linux ? here is my rewrite rule Quote:
Thanks, |
Hi,
It should work. Are you sure you have "RewriteEngine on" in httpd.conf? |
|
Enable rewrite logging to see what happens
Code:
RewriteLogLevel 9 If you copied .htaccess from the windows box, make sure it does not contain any control characters (like ^M at the end of each line). You can try to escape the special characters in your RewriteRules and see if it works this way: Code:
RewriteRule abc-(.*)-(.*)-(.*)\.htm$ /index.php\?action=\$1\&cat_id=\$2\&id=\$3 |
well when I put the logging tags in .htaccess file
then the site doesn't even show up. I put it above and below "RewriteEngine On" but didn't work. The escaping didn't work either. you know when i try the following Quote:
Code:
/index.php?action=$1&cat_id=$2&id=$3 my link is like this http://domain.com/abc-article-03432-2344.htm So "article" should print at $1 and "03432" at $2 and "2344" at $3. Any idea ? |
I've tested here and it works (of course my index.php does not work with your options):
Quote:
|
you know when I put my domain in that rule then it works for example
Code:
Why when i put my domain in the rule then it works and when i don't put my domain then it doesn't work... :( |
ok got it ..
My files are here http://ip/~user/ so I had to put my rule like following [code] RewriteRule abc-(.*)-(.*)-(.*)\.htm$ /~user/index.php?action=$1&cat_id=$2&id=$3 [code] Thanks Bathory For your help :) |
All times are GMT -5. The time now is 01:30 PM. |