Eric,

I very much appreciate your answer! It appears setup is as needed/described. 
This is why itโ€™s puzzling that this one standard code block prevents the hide 
debug code from working.

Our system admin tells me that rewrite in Apache is enabled.

Our system admin also tells me that "AllowOverride All" is enabled in the 
<Directory> subdirective under <VirtualHost> for the domain..

<Directory /xxx/xxx/xxx>
   AllowOverride All
   RewriteEngine on
  </Directory>


I donโ€™t have permissions even under sudo to restart Apache on this server.


Is there an order to the .htaccess file? Does it matter which directive comes 
before the other?

Thanks,
Lisa

From: Eric Shields | #MassTransitHonchkrow 
<masstransitk...@protonmail.com.INVALID>
Sent: Monday, May 3, 2021 9:05 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Is there an order to the .htaccess file

You'll need to enable rewrite in Apache in order for rewrite rules to work. 
Also, make sure that "AllowOverride All" is enabled in the <Directory> 
subdirective under <VirtualHost> for the domain you wish to enable this on. 
Otherwise, the .htaccess file will be ignored by the virtual host.

Type the command "sudo a2enmod rewrite.load" and then restart apache. For 
systemd users, type "sudo systemctl restart apache2". If you forget sudo, it 
will ask for your password anyway.


Eric Shields ๐Ÿš MassTransitHonchkrow
Ask me about the Krowverse Suite of Services.


โ€โ€โ€โ€โ€โ€โ€ Original Message โ€โ€โ€โ€โ€โ€โ€
On Monday, May 3rd, 2021 at 8:59 PM, Di Gregorio, Lisa 
<ldigrego...@gc.cuny.edu<mailto:ldigrego...@gc.cuny.edu>> wrote:


Hello,



I have to keep the below block at the bottom of my .htaccess file or the 
directive I have to hide the debug file wonโ€™t work. So far, I have tried moving 
this block to the top of the file and allowing for one  and only one of

RewriteEngine On in the file and one and only one of RewriteBase /     This 
doesnโ€™t make a difference. The debug file still wonโ€™t be hidden when following 
this format. Does anyone have any other idea as to why this block must be at 
the bottom of the .htaccess file, which also means all other code needs to be 
placed above this block.  Thank you!





# BEGIN WordPress

#NEEDS TO BE AT END OF FILE OR HIDE DEBUG FILE CODE DOESN'T WORK

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]



# uploaded files

RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]



RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^ - [L]

RewriteRule . index.php [L]

# END WordPress

Reply via email to