Forum

Error: Request-URI Too Long, with a 414 in the same popup

John
30 March 2017, 01:04
Hi everyone am trying to install a php script called churchinfo and I get the below error message'
Request-URI Too Long, with a 414 in the same popup just below the message.
Can anyone tell me is this something that I can fix in hiawatha, or is it a php related setting.

I get a second problem with another CMS, e107 cms.
It installed no problem, I used no url toolkit, but it installed,
then each time I navigate to it I get an Internal server error 500 message,
so far if I have a second go at what ever page I require the page works.
I first got this error immediately after installing the e107 cms script, and am
thinking it must be s re write issue, can anyone please advise if a url toolbox is
available for e107 cms, or can someone write one.

Regards & Thanks, john
John
30 March 2017, 01:30
Here is the .htaccess file from the e107 cms that I mentioned above.
Maybe it would help understand what could be going wrong, and perhaps someone
could look at creating a url toolkit from the content, and explain what other hiawatha
conf settings need altered to have a similar effect as those in the apache .htaccess file below.
# Custom error pages for php scripts only
<FilesMatch \.php$>
ErrorDocument 400 /error.php?400
ErrorDocument 401 /error.php?401
ErrorDocument 403 /error.php?403
ErrorDocument 404 /error.php?404
ErrorDocument 500 /error.php?500
</FilesMatch>

### Performance
### AddDefaultCharset utf-8

### Security
ServerSignature Off

# secure htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>

# protect e107_config.php
<Files e107_config.php>
order allow,deny
deny from all
</Files>


### Block Bad Bots
SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT
SetEnvIfNoCase ^User-Agent$ .*(libwww-perl|aesop_com_spiderman) HTTP_SAFE_BADBOT
Deny from env=HTTP_SAFE_BADBOT

### Disable directory listing
Options -Indexes

### limit file uploads to 10mb
### LimitRequestBody 10240000

<IfModule mod_rewrite.c>

<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
SetEnv HTTP_MOD_REWRITE_MEDIA On
</IfModule>

### enable rewrites
### Options +FollowSymLinks
RewriteEngine On


### Set this to your e107 site root, path relative to web root
### Uncomment it in case your server isn't able to rewrite proper
#RewriteBase /

### Allow only GET and POST methods
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)


RewriteRule .* - [F]

### Rewrite for Image URLs
ReWriteRule ^media\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_MEDIA_IMAGE/$5&$1w=$2&$3h=$4 [NC,L]
ReWriteRule ^media\/avatar\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_AVATAR/$5&$1w=$2&$3h=$4 [NC,L]
RewriteRule ^media\/img\/([-A-Za-z0-9+/]*={0,3})\.(jpg|gif|png)?$ thumb.php?id=$1 [NC,L]
ReWriteRule ^theme\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ thumb.php?src=e_THEME/$5&$1w=$2&$3h=$4 [NC,L]

### send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(e107_images|e107_files)/

### don't rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

### Single entry point ###
RewriteRule .* index.php [L]

</IfModule>

### Mod_Expires Settings (when available)
### May be modified if required
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 2 hours"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
</IfModule>

### Gzip Compression Module
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml text/xml application/rss+xml
</ifmodule>


### Enable when developing locally.
### SetEnv E_DEV true



Thanks, john
Hugo Leisink
30 March 2017, 08:36
The URL toolkit rule you're looking for should be this:
UrlToolkit {
ToolkitID = e107
Match ^/media\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ Rewrite /thumb.php?src=e_MEDIA_IMAGE/$5&$1w=$2&$3h=$4
Match ^/media\/avatar\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ Rewrite /thumb.php?src=e_AVATAR/$5&$1w=$2&$3h=$4
Match ^/media\/img\/([-A-Za-z0-9+/]*={0,3})\.(jpg|gif|png)?$ Rewrite /thumb.php?id=$1
Match ^/theme\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)?$ Rewrite /thumb.php?src=e_THEME/$5&$1w=$2&$3h=$4
Match ^/(e107_images|e107_files)/ Return
RequestURI exists Return
Match .* Rewrite /index.php
}
John
30 March 2017, 12:02
Hello Hugo
Thank you kindly for your support, I will use this toolkit and hope to report back so
others can bennefit from my experience, and of course your help.

Thanks & Regards, john
This topic has been closed.