themilkman Posted July 7, 2009 Share Posted July 7, 2009 Hi I just add wordpress in a subfolder and on my main domain have an oscommerce site like: mydomain.com/blog When ever trying to access the blog I get the following issue: Warning: Unexpected character in input: ' in /usr/bin/php5-cgi on line 4009 Warning: Unexpected character in input: '' (ASCII=4) state=1 in /usr/bin/php5-cgi on line 4009 Parse error: syntax error, unexpected '$' in /usr/bin/php5-cgi on line 4009 My hosting company says that there are misconfiguration issues with my oscommerce htaccess but I cannot see anything wrong, can someone please advise? Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^.*/index.php [NC] RewriteRule ^(.*)index.php$ http://www.mydomain.com/$1 [R=301,L] #authour to hide htaccess IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* #authour Ultimate URLS RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING} # deny most common except .php <FilesMatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|theme|module|exe)$"> deny from all </FilesMatch> # Disable .htaccess viewing from browser <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy All </Files> # Disable access to config.php <Files ~ "includes\configure.php$"> deny from all </Files> #For IP TRAP functionality SetEnvIfNoCase Request_URI IP_Trapped\.txt ban <Files ~ "^.*$"> order allow,deny allow from all deny from env=ban </Files> #Error handling ErrorDocument 404 http://www.mydomain.com/404.php # anti xss script 1 - pci compliance - by pixclinic Anti XSS http://addons.oscommerce.com/info/6044 RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} (\<|%3C).*iframe.*(\>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} GLOauthourS(=|\[|\%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) RewriteRule ^(.*)$ http://www.mydomain.com/personal [F,L] RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] # extra anti uri and xss attack script 2 - sql injection prevention Anti XSS http://addons.oscommerce.com/info/6044 RewriteCond %{QUERY_STRING} ("|%22).*(>|%3E|<|%3C).* [NC] RewriteRule ^(.*)$ http://www.mydomain.com/personal [NC] RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC] RewriteRule ^(.*)$ http://www.mydomain.com/personal [NC] RewriteCond %{QUERY_STRING} (java script:).*(;).* [NC] RewriteRule ^(.*)$ http://www.mydomain.com/personal [NC] RewriteCond %{QUERY_STRING} (;|'|"|%22).*(union|select|insert|drop|update|md5|benchmark|or|and|if).* [NC] RewriteRule ^(.*)$ http://www.mydomain.com/personal [NC] RewriteRule (,|;|<|>|'|`) http://www.mydomain.com/personal [NC] #authour 110908 END Many Thanks Whats the point of a signature? Link to comment Share on other sites More sharing options...
FIMBLE Posted July 7, 2009 Share Posted July 7, 2009 Have you tried this with a new standard .htaccss? Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions Link to comment Share on other sites More sharing options...
themilkman Posted July 7, 2009 Author Share Posted July 7, 2009 Have you tried this with a new standard .htaccss?Nic New standard .htaccess? I have tried removing this code: RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^.*/index.php [NC] RewriteRule ^(.*)index.php$ http://www.mydomain.com/$1 [R=301,L] and the the blog works fine but then that obviously leaves my oscommerce site having a www and non-www url which is no good for me as the ssl is configured for the www version. Also I noticed that when trying to load mydomain.com/blog, when the error is thrown the url changes to mydomain.com/cgi-bin/php/blog So I hav eno idea now....... at the moment. Whats the point of a signature? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.