Mod rewrite localhost working fine, on server in PHP QUERY_STRING and $_GET empty
I have a weird problem. I develop my sites on localhost and after that i distribute it server side. Most of the time this is working as expected but now notice something weird and cannot figure out what the problem is. On the server all RewriteRule redirects but without expected queries. Something like this is working fine on localhost but not on the server: RewriteEngine On .... .... RewriteRule ..... EDIT: Changed entries for security reasons, sorry! .... .... Does anybody knows what is going on? Do i miss something? Why are the queries not passed thru? Is it a server configuration? Cannot find anything about it on the internet. Thank you for your comments. EDIT: SOLUTION below, second comment. Has something to do with what apache handles first.
These things are nearly impossible to debug. But mod_rewrite offers one feature that you should set up to investigate this: RewriteLog /tmp/rewritelog.txt RewriteLogLevel 2 The RewriteLog directive however cannot be used from .htaccess. You need to declare it in the vhost or main server configuration. If level 2 is still insufficient, then try 3. Otherwise I'd just would advise you to try a RewriteBase, since you seem to match varying directory levels with your rules. Possibly repeat your rules in the subdirectories (streambutler/) again. Apaches mod_rewrite is peculiar and ignores them in the parent dir sometimes.
#Erwinus, the "Perdir" functionality that you discuss is standard in Apache but not well understood. Apache will probe for, then open and read all existing .htaccess files on the path to a script filename. (Ignoring the RewriteOptions inherit chase which is rarely chosen) it uses the deepest .htaccess file that it finds that has RewriteEngine On. I would therefore differ from Mario's view in that IMHO its almost impossible to get a parent directories rewrite rules to preempt a child directory set -- the default action of Apache is to ignore the parent. I explain in a more detail in this blog article.
how to use codegen in swagger to create server side code in php
Notice: Undefined variable: Name in C:\xampp\htdocs\SummerProject\expense.php on line 11 [duplicate]
How to scrape the facebook Page using Goutte in laravel?
Create form where the sent content creates another page that displays it
Symfony/VichUploaderBundle image upload
Yii2 - fatal error , try-catch not working
Magento error: Mage registry key “controller” already exists
Show preview in another view page in ajax
Opencart remove redirect 302 to index?route=common/home .htaccess
get previous url in magento as a string
Selected Menu Link In Wordpress Custom Theme Does Not Work
Undefined variables, PHP execution not showing [duplicate]
Insert Item After x Number of Posts in a Sequence
Outputing the counted number of notifications on the view using CodeIgniter
why codeigniter return false when I have records on my row?
Laravel or php I have a week number of a month and a day, how can i get the date of these..?