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.
Displaying nothing when I am trying to scrape data using simple html dom parser
PHP inserting late through time blocks
YII Server Move. Internal Server Error. CDbException
Having troubles posting form data with ajax to controller action (laravel)
Laravel 5.2 Unit Tests error: BadMethodCallException: Call to undefined method Illuminate\Database\Query\Builder::make()
Full-Text Search Function not working at all
WordPress settings page for custom methods
laravel get jobs from redis queue located in another codebase\project?
How to concatenate variable and string that contains () in php
Laravel mysql multiple operations with one DB instance
How to add form data to a bootstrap modal in the same page by using jQuery?
WP - How to get all the comment_post_ID in bulk comment approval
How to grab a random MYSQL Column Value using PHP and echo it?
Secure way to allow a specific PHP script to read/write a directory?
php searching empty fields in the db [duplicate]
PHP strtotime returns incorrect month [duplicate]