Question about some code in htaccess file

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.2/Rhea followed by 3.3.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.1. If you need support for phpBB 3.1 please visit the 3.1.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
User avatar
mrgtb
Registered User
Posts: 217
Joined: Wed Nov 28, 2007 10:09 pm

Question about some code in htaccess file

Post by mrgtb » Sat Jun 28, 2014 9:06 am

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 Online
Support Team Leader
Support Team Leader
Posts: 135
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas
Contact:

Re: Question about some code in htaccess file

Post by Noxwizard » Sat Jun 28, 2014 3:41 pm

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.

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

Re: Question about some code in htaccess file

Post by mrgtb » Sat Jun 28, 2014 6:43 pm

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 Online
Support Team Leader
Support Team Leader
Posts: 135
Joined: Sun Dec 18, 2005 5:44 pm
Location: Texas
Contact:

Re: Question about some code in htaccess file

Post by Noxwizard » Sat Jun 28, 2014 7:17 pm

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

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

Re: Question about some code in htaccess file

Post by mrgtb » Sat Jun 28, 2014 7:36 pm

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