Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite works on XP but not in Linux

mod_rewrite works on XP but not in Linux

         

chuender

8:41 pm on May 1, 2004 (gmt 0)

10+ Year Member



This is my scrip:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteBase /
RewriteRule ^index/(.*)/(.*)/(.*)/(.*)/(.*)$?fuseaction=$1.$2&display=$3&by=$4&model_no=$5
RewriteRule ^index/(.*)/(.*)/(.*)/(.*)$?fuseaction=$1.$2&display=$3&by=$4 [QSA]
RewriteRule ^index/(.*)/(.*)/(.*)$?fuseaction=$1.$2&display=$3 [QSA]
RewriteRule ^index/([^/]+)/([^/]+)$ index?fuseaction=$1.$2 [QSA]
RewriteRule ^index index.php [L]

It works in XP but not in Linux when I upload to my ISP. What is the cause?

Thanks for your help.

Chuender

jdMorgan

12:45 am on May 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should contact your hosting provider and ask them if you are allowed to use mod_rewrite. I suspect that the answer is "no", or that it is disabled by default.

Jim

chuender

2:20 am on May 2, 2004 (gmt 0)

10+ Year Member



My ISP has it enabled.

bird

11:35 am on May 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So what exactly are the symptom of the failure?
"Doesn't work" gives no useful clues for debugging.

chuender

5:02 pm on May 2, 2004 (gmt 0)

10+ Year Member



I'm not sure what is happening, but it works in WindowsXp by traslating

[mydomain.com...]

to

[mydomain.com...]

Seems like the .htaccess file is not even being looked at by the Linux server that my ISP uses. "It doesn't work" in this case means nothing happens. If I type in the first link aboved the server serves the right page, but not the second link. The server does not error out even if I purposely put in a but in the code.

Thanks.

jdMorgan

9:59 pm on May 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try a simple test:

Place the following code in .htaccess in your Web root directory with your "home page."


Options +FollowSymLinks
RewriteEngine on
RewriteCond ^silly\.html$ /index.html [L]

Request "silly.html" from your server. It should return index.html, your home page. If not, then mod_rewrite is disabled.

Jim

chuender

7:31 am on May 13, 2004 (gmt 0)

10+ Year Member



hi jim,

my mod_rewrite is definitely enabled. but i feel it may be overwritten by something else?

chuender