Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite strange issue

         

undimon

8:05 am on Jan 12, 2008 (gmt 0)

10+ Year Member



This is my .htaccess code:

###
RewriteEngine on

#ErrorDocument 404 /

RewriteRule ^keyword/([0-9]+)/$ process.php?var=$1 [L]

#Content pages
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^([^/]+)/?$ index.php?url=$1
###

I'm about:
RewriteRule ^keyword/([0-9]+)/$ process.php?var=$1 [L]

when script name if different than pattern (keyword - process.php) - this rule works fine, but when I use the same names:

RewriteRule ^process/([0-9]+)/$ process.php?var=$1 [L]

- it doesn't (var is not set) :((

can anyone tell me why?

jdMorgan

5:33 pm on Jan 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't see why it won't work. Did you completely flush your browser cache before testing this?

Jim

undimon

7:36 pm on Jan 12, 2008 (gmt 0)

10+ Year Member



Yes I flushed cash and tried in other browser - result the same.

It's interesting, that process.php open, but $_GET is empty...

jdMorgan

9:00 pm on Jan 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look into disabling content-negotiation (Options -MultiViews), and if you are on Apache 2.x, also disable PathInfo (AcceptPathInfo Off). These may be interfering with your rewrite.

Jim

[edited by: jdMorgan at 9:01 pm (utc) on Jan. 12, 2008]

undimon

7:44 am on Jan 14, 2008 (gmt 0)

10+ Year Member



Thanks, Jim! It's works! :)

I have added "Options -Multiviews" on top of my .htaccess, and things started to work!