apache doesn't accept this htaccess rewrite rule [duplicate]












0
















This question already has an answer here:




  • RewriteRule creating 500 Internal Server Error

    4 answers



  • Internal server error With RewriteRule

    1 answer



  • RewriteRule Last [L] flag not working?

    2 answers




For some reason Apache is throwing an error if I use this rewrite rule in my .htaccess file



RewriteRule ^(.*)$ /controller.php?lang=en&page=$1 [NE,QSA,L]


What I want to achieve is the following:
If the user hits



https://www.mywebsite.com/whatever


I want to call



https://www.mywebsite.com/controller.php?lang=en&page=whatever


Here's the error I get:




Internal Server Error



The server encountered an internal error or misconfiguration and was
unable to complete your request.



Please contact the server administrator at webmaster@mywebsite.com
to inform them of the time this error occurred, and the actions you
performed just before this error.



More information about this error may be available in the server error
log.



Additionally, a 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.











share|improve this question













marked as duplicate by mario php
Users with the  php badge can single-handedly close php questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 21 '18 at 17:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Look into the error.log for details. Possibly enable the rewrite log as well. Also this rule is too generic and going to recurse.

    – mario
    Nov 21 '18 at 17:57











  • ok found the problem, the rewritten url was matching again the rule causing an infinite loop

    – Gianluca Ghettini
    Nov 21 '18 at 18:03











  • Either strip the leading target / or use the [END] flag. Better yet use something more fitting than (.*), such as w+

    – mario
    Nov 21 '18 at 18:04


















0
















This question already has an answer here:




  • RewriteRule creating 500 Internal Server Error

    4 answers



  • Internal server error With RewriteRule

    1 answer



  • RewriteRule Last [L] flag not working?

    2 answers




For some reason Apache is throwing an error if I use this rewrite rule in my .htaccess file



RewriteRule ^(.*)$ /controller.php?lang=en&page=$1 [NE,QSA,L]


What I want to achieve is the following:
If the user hits



https://www.mywebsite.com/whatever


I want to call



https://www.mywebsite.com/controller.php?lang=en&page=whatever


Here's the error I get:




Internal Server Error



The server encountered an internal error or misconfiguration and was
unable to complete your request.



Please contact the server administrator at webmaster@mywebsite.com
to inform them of the time this error occurred, and the actions you
performed just before this error.



More information about this error may be available in the server error
log.



Additionally, a 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.











share|improve this question













marked as duplicate by mario php
Users with the  php badge can single-handedly close php questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 21 '18 at 17:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Look into the error.log for details. Possibly enable the rewrite log as well. Also this rule is too generic and going to recurse.

    – mario
    Nov 21 '18 at 17:57











  • ok found the problem, the rewritten url was matching again the rule causing an infinite loop

    – Gianluca Ghettini
    Nov 21 '18 at 18:03











  • Either strip the leading target / or use the [END] flag. Better yet use something more fitting than (.*), such as w+

    – mario
    Nov 21 '18 at 18:04
















0












0








0









This question already has an answer here:




  • RewriteRule creating 500 Internal Server Error

    4 answers



  • Internal server error With RewriteRule

    1 answer



  • RewriteRule Last [L] flag not working?

    2 answers




For some reason Apache is throwing an error if I use this rewrite rule in my .htaccess file



RewriteRule ^(.*)$ /controller.php?lang=en&page=$1 [NE,QSA,L]


What I want to achieve is the following:
If the user hits



https://www.mywebsite.com/whatever


I want to call



https://www.mywebsite.com/controller.php?lang=en&page=whatever


Here's the error I get:




Internal Server Error



The server encountered an internal error or misconfiguration and was
unable to complete your request.



Please contact the server administrator at webmaster@mywebsite.com
to inform them of the time this error occurred, and the actions you
performed just before this error.



More information about this error may be available in the server error
log.



Additionally, a 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.











share|improve this question















This question already has an answer here:




  • RewriteRule creating 500 Internal Server Error

    4 answers



  • Internal server error With RewriteRule

    1 answer



  • RewriteRule Last [L] flag not working?

    2 answers




For some reason Apache is throwing an error if I use this rewrite rule in my .htaccess file



RewriteRule ^(.*)$ /controller.php?lang=en&page=$1 [NE,QSA,L]


What I want to achieve is the following:
If the user hits



https://www.mywebsite.com/whatever


I want to call



https://www.mywebsite.com/controller.php?lang=en&page=whatever


Here's the error I get:




Internal Server Error



The server encountered an internal error or misconfiguration and was
unable to complete your request.



Please contact the server administrator at webmaster@mywebsite.com
to inform them of the time this error occurred, and the actions you
performed just before this error.



More information about this error may be available in the server error
log.



Additionally, a 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.






This question already has an answer here:




  • RewriteRule creating 500 Internal Server Error

    4 answers



  • Internal server error With RewriteRule

    1 answer



  • RewriteRule Last [L] flag not working?

    2 answers








php apache .htaccess mod-rewrite






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 '18 at 17:52









Gianluca GhettiniGianluca Ghettini

5,51164386




5,51164386




marked as duplicate by mario php
Users with the  php badge can single-handedly close php questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 21 '18 at 17:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by mario php
Users with the  php badge can single-handedly close php questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 21 '18 at 17:58


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Look into the error.log for details. Possibly enable the rewrite log as well. Also this rule is too generic and going to recurse.

    – mario
    Nov 21 '18 at 17:57











  • ok found the problem, the rewritten url was matching again the rule causing an infinite loop

    – Gianluca Ghettini
    Nov 21 '18 at 18:03











  • Either strip the leading target / or use the [END] flag. Better yet use something more fitting than (.*), such as w+

    – mario
    Nov 21 '18 at 18:04





















  • Look into the error.log for details. Possibly enable the rewrite log as well. Also this rule is too generic and going to recurse.

    – mario
    Nov 21 '18 at 17:57











  • ok found the problem, the rewritten url was matching again the rule causing an infinite loop

    – Gianluca Ghettini
    Nov 21 '18 at 18:03











  • Either strip the leading target / or use the [END] flag. Better yet use something more fitting than (.*), such as w+

    – mario
    Nov 21 '18 at 18:04



















Look into the error.log for details. Possibly enable the rewrite log as well. Also this rule is too generic and going to recurse.

– mario
Nov 21 '18 at 17:57





Look into the error.log for details. Possibly enable the rewrite log as well. Also this rule is too generic and going to recurse.

– mario
Nov 21 '18 at 17:57













ok found the problem, the rewritten url was matching again the rule causing an infinite loop

– Gianluca Ghettini
Nov 21 '18 at 18:03





ok found the problem, the rewritten url was matching again the rule causing an infinite loop

– Gianluca Ghettini
Nov 21 '18 at 18:03













Either strip the leading target / or use the [END] flag. Better yet use something more fitting than (.*), such as w+

– mario
Nov 21 '18 at 18:04







Either strip the leading target / or use the [END] flag. Better yet use something more fitting than (.*), such as w+

– mario
Nov 21 '18 at 18:04














0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

鏡平學校

ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

Guess what letter conforming each word