mod rewrite not working with template

More
5 years 7 months ago #5497 by pshempel
pshempel created the topic: mod rewrite not working with template
I have added to the apache config the following settings

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* /home/hempelinvestments/public_html/index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]


RewriteCond %{REQUEST_URI} !^/administrator/.*
RewriteCond %{REQUEST_URI} !^/administrator/
RewriteCond %{REQUEST_URI} !^/administrator

#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* /home/hempelinvestments/public_html/index.php [L]
#
## End - Joomla! core SEF Section.


The default template works with these settings. If you go to hempelinvestments.com you will see that any of the modules from the template ends up with a 404.

While this is happening you look at the apache logs and you will see the following

[Thu Feb 13 23:13:01.779520 2014] [:error] [pid 24428] [client 2604:8800:100:8182:24f7:e4d9:4823:6734:34820] PHP Notice: Trying to get property of non-object in /home/hempelinvestments/public_html/plugins/finder/categories/categories.php on line 216, referer: hempelinvestments.com/administrator/inde...ries&view=categories


I have set Search Engine Friendly URLs and Use URL rewriting to yes. So I am not sure what I have done wrong.


Also if you go to hempelinvestments.com/log-in you will get

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

Please contact the website owners to inform them of this problem.

One other thing I have no clue as to how the logo.png ended up on the right side

Gzip compression is not on, and this error goes away if I disable modrewite and sef settings.

I have setup a number of Joomla sites like this and I have never seen this unless I have installed a template that was not for the version of Joomla or a templete that did not support the sef settings.

Thanks in advance for your help.

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #5500 by marcin
marcin replied the topic: mod rewrite not working with template
Hello,

Could you leave us a ticket with your administrator details and FTP server details, please? We will take a closer look to this.

www.joomla-monster.com/contact

Regards,
Marcin

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #5501 by pshempel
pshempel replied the topic: mod rewrite not working with template
I have done as asked and details are in the ticket

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago - 5 years 7 months ago #5505 by pshempel
pshempel replied the topic: mod rewrite not working with template
BTW, this should have gone into the templates for 3.0. I made the mistake of selecting 1.5.
If you could move this there it will make others looking at this same problem much easier to find for the correct version.

Thanks
Last Edit: 5 years 7 months ago by pshempel.

Please Log in or Create an account to join the conversation.

Time to create page: 0.256 seconds

INDICO S.C.

ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2019 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.