Question about some code in htaccess file

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
mrgtb
Registered User
Posts: 221
Joined: Wed Nov 28, 2007 10:09 pm

Question about some code in htaccess file

Post by mrgtb »

In the htaccess file this line of code is commented out not used by default.

Code: Select all

#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
What exactly is this line of code supposed to do when you uncomment it, as I've searched google on it and can't find what exactly it does. Does it have anything to do with removing WWW from URL address when enabled if the server doesn't remove WWW by default when friendly URL are used with no WWW added in forum address with phpBB 3.1. I'm thinking it has nothing to do with that, but no idea still what enabling it does? Or when you know it's needed to be enabled?

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 137
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas
Contact:

Re: Question about some code in htaccess file

Post by Noxwizard »

Per the comment above it, it's a workaround for PHP via CGI. It sets the environment variable HTTP_AUTHORIZATION to contain the value of the HTTP header, Authorization. It's used for HTTP authentication for the feed.

mrgtb
Registered User
Posts: 221
Joined: Wed Nov 28, 2007 10:09 pm

Re: Question about some code in htaccess file

Post by mrgtb »

Right, my question then. When I look at PHP.ini page via admin cp in phpBB3. I see it says this in one of the columns.

Server API: CGI/FastCGI

So does that mean I should enable that line? But have RSS Feed enabled on my site and seems to work OK.

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 137
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas
Contact:

Re: Question about some code in htaccess file

Post by Noxwizard »

Are you actually using HTTP Authorization to view the feed instead of cookies? If you are and it works, then obviously it's fine.

mrgtb
Registered User
Posts: 221
Joined: Wed Nov 28, 2007 10:09 pm

Re: Question about some code in htaccess file

Post by mrgtb »

No, I don't use HTTP enabled on feeds. I get what you mean now and that setting is disabled. Didn't know that line in the htaccess file was related to that feed setting before.

Post Reply