views:

276

answers:

2

Hello. I have a problem with mod-rewrite, to be more precise, it doesn't redirect me properly. Everything works fine on my local server, the problem only occurs when the site goes live... This is what I have in the .htaccess:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

RewriteRule ^(tutorial|news|out|profile|script)/([0-9]+)/?$ $1.php?id=$2 [L]
RewriteRule ^(tutorial|news)/([0-9]+)/post-comment/?$ $1.php?id=$2&action=postcmt [L]

RewriteRule ^atelier/([0-9]+)/?$ img/gallery/view.php?id=$1 [L]
RewriteRule ^([a-zA-Z0-9]+)/page/([0-9]+)/?$ $1.php?page=$2 [L]
RewriteRule ^get/([a-zA-Z0-9]+)/([0-9]+)/?$ $1/get.php?id=$2 [L]
RewriteRule ^get/brushes/(abr|img)/([0-9]+)/?$ brushes/$1.php?id=$2 [L]

RewriteRule ^([a-zA-Z0-9]+)/(c|series|type)/([0-9]+)/page/([0-9]+)/?$ $1.php?$2=$3&page=$4 [L]
RewriteRule ^([a-zA-Z0-9]+)/(c|series|type)/([0-9]+)/?$ $1.php?$2=$3 [L]

RewriteRule ^design/preview/([0-9]+)/?$ design/preview.php?id=$1 [L]
RewriteRule ^([a-zA-Z0-9]+)/send/?$ $1.php?action=send [L]
RewriteRule ^askme/post-question/?$ ask.php?action=ask [L]

If I enter news/5/ for example, it will only redirect me to news.php, design/preview/5 will only take me to design/preview.php and so forth. On the contrary, get/brushes/abr/1 works fine... I have no idea what I'm doing wrong, any suggestions?

A: 

Just to start from the simplest place and add complication after, does this work for you?

RewriteRule ^news/([^/\.]+)/?$ news.php?id=$1 [L,NC]
Sohnee
Again, it works locally but not on the actual site.
It doesn't sound like the rewrite engine is even switched on then - although I can see you have the "RewriteEngine on" in your .htaccess
Sohnee
+1  A: 

MultiViews could cause this behavior. Try to disable it:

Options -MultiViews
Gumbo
That solved it. Thank you so much! :)