Re: [users@httpd] Removing single question mark?

2024-06-20 Thread Eric Covener
On Thu, Jun 20, 2024 at 7:08 PM Dave Wreski
 wrote:

> Hi, I should add that I wrote the following to remove an errant question
> mark from the end of another URL, but it doesn't appear to work for the
> homepage.
>
> RewriteCond %{THE_REQUEST} /features\? [NC]
>
RewriteRule ^ %{REQUEST_URI} [L,R=302,NE,QSD]
>

I think %{THE_REQUEST} is the way to go. But what do you mean about "the
homepage" and how does it relate to /features in your regex?
Maybe you want something closer to this for a request with a trailing ?
and no actual query:
RewriteCond %{THE_REQUEST} "? HTTP/" [NC]

If it doesn't work, post rewrite:trace8 output.


Re: [users@httpd] Removing single question mark?

2024-06-20 Thread Dave Wreski
Hi, I should add that I wrote the following to remove an errant question 
mark from the end of another URL, but it doesn't appear to work for the 
homepage.


RewriteCond %{THE_REQUEST} /features\? [NC]
RewriteRule ^ %{REQUEST_URI} [L,R=302,NE,QSD]

Thanks,
Dave

On 6/20/24 7:01 PM, Dave Wreski wrote:


Hi,

I have another challenging rewrite rule request, please. I'm trying to 
remove a single question mark from a URL:


https://example.com/?

I've tried the following:

RewriteRule ^/\?$ / [L,R=301,QSD]
RewriteRule ^/\? /? [L,R=301]

RewriteCond %{REQUEST_URI} ^$
RewriteRule ^ /? [L,R=301,QSD]

But it seems to ignore all of them. Ideas greatly appreciated.

Thanks,
Dave



--

Profile Photo



Dave Wreski

Chief Executive Officer



Guardian Digital Logo 

*We Make Email Safe For Business*



Guardian Digital Facebook  Guardian 
Digital Twitter  Guardian Digital Linkedin 



Phone Icon 



(640)-800-9446 



Email Security

Web Icon 



www.guardiandigital.com 



Sender Fraud Protection

Email Icon 



dwre...@guardiandigital.com



Training & Awareness

Location Icon 



103 Godwin Ave, Suite 314, Midland Park, NJ 07432 



[users@httpd] Removing single question mark?

2024-06-20 Thread Dave Wreski

Hi,

I have another challenging rewrite rule request, please. I'm trying to 
remove a single question mark from a URL:


https://example.com/?

I've tried the following:

RewriteRule ^/\?$ / [L,R=301,QSD]
RewriteRule ^/\? /? [L,R=301]

RewriteCond %{REQUEST_URI} ^$
RewriteRule ^ /? [L,R=301,QSD]

But it seems to ignore all of them. Ideas greatly appreciated.

Thanks,
Dave



[users@httpd] output buffer php ProxySet

2024-06-20 Thread Marc
I am experimenting a bit with output buffering with php-fpm[1]. In my default 
setup I can't get this to work. Currently I am only getting this to work when I 
add this to my virtualhost config:


ProxySet enablereuse=on flushpackets=on


I assume this will impact the rest of the website. Is there a way to limit this 
to a directory or file? I prefer to have this done in a .htaccess file because 
I am not sure if I will be able to access httpd conf files.




[1]
header( 'Content-type: text/html; charset=utf-8' );
echo 'Begin ...';
for( $i = 0 ; $i < 10 ; $i++ )
{
echo $i . '';
flush();
ob_flush();
sleep(1);
}
echo 'End ...';
?>