php - Getting error when trying to declare custom cookie for Apache load balancer -
I have followed several tutorials (like) and set up an Apache load balancer that works fine except for a session I'm trying to modify my redirect (which works until I add an additional flag (?):
RewriteRule ^ (. *) $ Public_html / index Php - [CO = JSESSIONID: balancer.view-a: .ea-hq.com] This causes an internal server error:
C: / Web server / Apache 24 / htdocs / .htaccess: re Writing: Bad flag delimiter So my sessions are not being held between two servers.
I am using
if You need to provide more information to me, please say. > I have made the change:
Rev. R ^^ (. *) $ - [CO = JSESSIONID: Balancer View-A: .ea-hq.com] Rewrite Rules ^ (. *) $ Public_html / index.php But now many files are not loaded and 302 Does not have a "status" status and These are lean when viewing them through the Inspector in Chrome
RewriteRule ^ $ public_html / index.php [CO = jsessionid. (*.): Balancer.view-e: .ea-headquarters .com] gives me the same results.
Here is my complete .htaccess file without cookies revision:
option + FollowSymLinks IndexIgnore * / * & LT; FilesMatch "\ (ico | pdf | flv | jpeg | png | gif | js | css | swf | eot | wff | ttf | svg?] $." & Gt; Activate when it finishes Finish Default "Access Plus 1 Year" & lt; / FilesMatch & gt; RewriteBase / RewriteEngine on # real path exists, ignore the rule, instead use RewriteCond% {REQUEST_FILENAME}! -f # Use only file names and extensions. RewriteRule ^ (?: [^ /] + /) * ([^.] + \. (? Gif | jpe? G | png | eot | woff | ttf | svg)) $ public_html / picture / $ 1 [r , !! L, NC] RewriteCond% {REQUEST_FILENAME} -f # RewriteCond% {REQUEST_FILENAME} -d RewriteCond% {REQUEST_URI} ^ / Importers RewriteCond% {REQUEST_URI} \ (gif | jpgj | png) $ RewriteRule ^ (. *) $ Public_html / index.php # Use below when upgrading the Apache. #FallbackResource public_html/index.php#php_flag session.bug_compat_421 #php_flag session.bug_compat_warn 0 & lt; IfModule mod_security.c & gt; SecRuleEngine off & lt; / IfModule & gt;
The rewrite rule requires 2 or 3 parameters, your command has 4 criteria
/ Li> Replacement: - Flags: [CO = JSESSIONID: balancer.view-a: .ea-hq.com] It is a matter of error syntax, replacement is public_ html / index.php and a - (dash).
(From the docs) A dash (-) indicates that no replacement should be made (the current path has been passed through insulated). It is used when a flag is required to be applied without changing the path.
So I think that you only need one dash and public_html / index.php (you can differentiate other rules).
example
rewrite angle% {REQUEST_FILENAME}! -f Rewrite Convert% {REQUEST_FILENAME}! -D Rivieraith ^ (. *) $ / Public_html / index.php / $ 1 [L, CO = JSESSIONID: balancer.view-a: .ea-hq.com] More info See for
Comments
Post a Comment