Stefano Posted December 15, 2007 Report Share Posted December 15, 2007 hey @ all =)its mi first post but untyl today a had no problems with the unifomserver,nice work =) but there i have one question:why does a a RewriteRule make an 500 Internal Server Error ?my code: Options +FollowSymLinks RewriteEngine On RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2 RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2&page=$3 RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2&page=$3&do=$4 RewriteRule ^contact$ /index.php?ids=contact it happens also on a fresh uniserver installation as on other OSes to, my OS w2k3, but it also happens on XP.do someone have some infos how i can realize that the code i posted would work?an my real webserver it does work, only localy on uniform it wants thxStefano Quote Link to comment Share on other sites More sharing options...
Ric Posted December 16, 2007 Report Share Posted December 16, 2007 Not sure what you are trying to do with the code however a 500 error indicates a server configuration problem. Check the server error log (*\Uniform Server\udrive\usr\local\apache2\logs\error.log) to see what the problem is. I have little experience with RewriteRule is the first minus valid [-0-9a-z] thought it specified a range hence something should come before it! Are you sure this is a valid construct *+ to me it looks as if they may conflict. You state on your real server it works, would this be Apache 1.3! I think check the error log first, should point you in the right direction. All the bestRic Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted December 17, 2007 Report Share Posted December 17, 2007 Try: RewriteEngine On RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2 RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2&page=$3 RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2&page=$3&do=$4 RewriteRule ^contact$ /index.php?ids=contact or RewriteEngine On Options +FollowSymLinks RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2 RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2&page=$3 RewriteRule ^([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)/([-0-9a-z]*+)$ /index.php?ids=$1§ion=$2&page=$3&do=$4 RewriteRule ^contact$ /index.php?ids=contact Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Stefano Posted December 20, 2007 Author Report Share Posted December 20, 2007 hey =)thanks for the replys =)this is form the error log:"W:/www/.htaccess: RewriteRule: cannot compile regular expression '^([0-9a-z]*+)/([0-9a-z]*+)$' "now ive changed this ([-0-9a-z]*+) to this ([0-9a-z])now there is no error, but i cant use now the function i made before.this script should work like this:httq://localhost/main-cat/section1/page2/edit/and interprets i to:/index.php?ids=$1§ion=$2&page=$3&do=$4 i want to eliminate urls like this httq://localhost/?ids=main-category§ion=1&do=editto make mo user/crawler friendly urls here a Demoand there is nothing changed its the code ive posted beforehosters apache version is:Apache/2.0.54 (Debian GNU/Linux) PHP/5.2.4-0+tld0 with Suhosin-Patch mod_ssl/2.0.54 OpenSSL/0.9.7e @olajideolaolorun: ive tried what you have posted but it doesnot work. i am noob in regular expression, so i dont now how to realize this so that it can work localy =(maybe some idea how to made user friendly urls for the UFS? thx Stefano ps: sorry for my bad english Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted December 20, 2007 Report Share Posted December 20, 2007 Did you try the ones i asked you to try?? Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Ric Posted December 20, 2007 Report Share Posted December 20, 2007 I think the only problem is with *+ in the original code use + only try this: Options +FollowSymLinks RewriteEngine On RewriteRule ^([-0-9a-z]+)/([-0-9a-z]+)$ /index.php?ids=$1§ion=$2 RewriteRule ^([-0-9a-z]+)/([-0-9a-z]+)/([-0-9a-z]+)$ /index.php?ids=$1§ion=$2&page=$3 RewriteRule ^([-0-9a-z]+)/([-0-9a-z]+)/([-0-9a-z]+)/([-0-9a-z]+)$ /index.php?ids=$1§ion=$2&page=$3&do=$4 RewriteRule ^contact$ /index.php?ids=contact All the bestRic Quote Link to comment Share on other sites More sharing options...
Stefano Posted December 20, 2007 Author Report Share Posted December 20, 2007 @olajideolaolorun: yes i tried, nothing changed.@Ric : there it is =) now it works! great! thx to all =) nice evening =) Stefano Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.