0
Welcome Guest! Login
0 items Join Now

Error after transfer to host

  • Error after transfer to host

    Posted 12 years 2 months ago
    • I recently developed a site using the Radiance template. Had everything working correctly on my dev site. Ran a backup of the site using Akeeba and retsored the site in its new godaddy home. I've done this several times and never that this issue. Can someone give me a clue as to what I should be troubleshooting?
       
      Warning: Invalid argument supplied for foreach() in /html/libraries/rokcommon/RokCommon/Service/SimpleXMLElement.php on line 22
       
      Warning: Invalid argument supplied for foreach() in /html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/Xml.php on line 196
       
      Warning: dom_import_simplexml() [function.dom-import-simplexml]: Invalid Nodetype to import in /html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/Xml.php on line 252
       
      Fatal error: Call to a member function removeChild() on a non-object in /html/libraries/rokcommon/RokCommon/Service/Container/Loader/File/Xml.php on line 253
       

      So far I am able to refresh a few times and the page will eventually load.
      I deleted part of the absolute path from the errors above. Also, in the administrator view, I receive these warnings on some module screens:
       
      Warning: simplexml_load_file() [function.simplexml-load-file]: /html/modules/mod_facebookwall/mod_facebookwall.xml:1: parser warning : Unsupported version '1.9' in /html/administrator/components/com_modules/models/module.php on line 716
       
      Warning: simplexml_load_file() [function.simplexml-load-file]: <?xml version="1.9" encoding="utf-8"?> in /html/administrator/components/com_modules/models/module.php on line 716
       
      Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /html/administrator/components/com_modules/models/module.php on line 716
       

      Any ideas on whats going on here?

      Thanks for looking :-)
    • yaani's Avatar
    • yaani
    • Elite Rocketeer
    • Posts: 869
    • Thanks: 5

    Re: Error after transfer to host

    Posted 12 years 2 months ago
    • Have you checked the live_site, log_path & tmp_path settings in the configuration.php file?

      Maybe some files got corrupted during ftp? Try re uploading the site files?
  • Re: Error after transfer to host

    Posted 12 years 2 months ago
    • Tried the re-upload to no avail. The tmp_path and log_path are correct, but live_site is empty. I assume that is okay since it is also empty (and working fine) on my dev server. I found a similar thread that points to this being godaddy specific.

      I'm wondering if its is something in the php.ini.. Perhaps the simplest solution is to find a new host (although I would like to know what specifically is causing the problem so I can avoid it with whomever I choose or know what to do if it reoccurs).

      Thanks for you reply, if you have any more ideas, I'm all eyes :shock:

      -Kris
    • yaani's Avatar
    • yaani
    • Elite Rocketeer
    • Posts: 869
    • Thanks: 5

    Re: Error after transfer to host

    Posted 12 years 2 months ago
    • Maybe this thread helps?
      blog.rockettheme.com/forum/index.php?f=3...e486a&rb_v=viewtopic

      What is the PHP memory_limit set to? Try 128MB

      I hosted for years on GoDaddy & eventually moved to Host Gator. Go Daddy keeps their site files & databases on different servers so Joomla sites are really slow on GoDaddy. Also all their servers are very overcrowded. I have noticed huge improvements on page load speeds & site performance since I changed to Host Gator. Sites are no longer slow & are a lot better to work on now that they are so much faster!
  • Re: Error after transfer to host

    Posted 12 years 2 months ago
    • I transferred the site to host gator (via akeeba) and thought I was having the same problem, but it seems to be the issue with rokweather that other users started talking about Monday. Thusfar, I have had no fatal errors, but I do have a concern:

      Before I realized Rokweather was broken, I thought I should perhps uninstall / reinstall the module. If it worked, I would do the same for any others with errors. I uninstalled the module successfully. Then reinstalled and received the two thumbs up. However, when I went to enable the module it was not in the list. Rokweather isn't listed in the moduletype dropdown either. Yet, if I go to manage I see it...and can uninstall it again.

      And my SEO isn't working.. but that's another thread :)
    • yaani's Avatar
    • yaani
    • Elite Rocketeer
    • Posts: 869
    • Thanks: 5

    Re: Error after transfer to host

    Posted 12 years 2 months ago
    • Well try creating a new module in module manager & see if RokWeather is in the list to select from. If it is then select it to create the RokWeather module.

      What SEO are you using? Joomla or 3rd party?
  • Re: Error after transfer to host

    Posted 12 years 2 months ago
    • It is indeed. Sorry, I thought they were created by default upon install so I didn't even check.

      I'm using Joomla seo. If you are using Joomla SEO on any of your host gator sites, would you mind sharing your relevant .htaccess?

      This is what I'm using:
       
      ###############################################################################
      ## Joomla 2.5 Master .htaccess / Version 2.5 (proposed) - May 31th, 2011
      ## ---------- Notice ---------- 
      ## It is prudent to remove all of the commenting notes once fully tested
      ## and functioning to reduce the file size the parsing time.
      ## ---------- Credits ---------- 
      ## Brian Teeman, Ken Crowder, Radek Suski and Fotis Evangelou,
      ## Jon Neubauer, Nicholas K. Dionysopoulos, Radek Suski, Jon Brown 
      ## Jeff Star @perishable
      ## Cindy Montano @montanodesigns
      ## ---------- Disclaimer ---------- 
      ## USE THIS FILE AT YOUR OWN RISK
      ## This is not a one-size fits all solution. You MUST test this file on your
      ## server to see what works best for you. 
      ## Many items may work for Joomla 1.5 but this is specifically for Joomla 2.5
      ## You have been warned.  Beyond this place, there be dragons.
      ###############################################################################
       
      ###################################################
      ##------------------The Basics-------------------##
      ###################################################
       
      ########## Begin - RewriteEngine enabled
      RewriteEngine On
      ########## End - RewriteEngine enabled
       
      ########## Begin - RewriteBase
      # Uncomment following line if your webserver's URL
      # is not directly related to physical file paths.
      # Update Your Joomla! Directory (just / for root)
       
      # RewriteBase /
      ########## End - RewriteBase
       
      ########## Begin - No directory listings
      ## Note: +FollowSymlinks may cause problems and you might have to remove it
      IndexIgnore *
      Options +FollowSymLinks All -Indexes
      ########## End - No directory listings
       
      ########## Begin - File execution order, by Komra.de
      DirectoryIndex index.php index.html
      ########## End - File execution order
       
      ###################################################
      ##------------------Performance------------------##
      ###################################################
      ########## Begin - ETag Optimization
      ## This rule will create an ETag for files based only on the modification
      ## timestamp and their size. This works wonders if you are using rsync'ed
      ## servers, where the inode number of identical files differs.
      ## Note: It may cause problems on your server and you may need to remove it
      FileETag MTime Size
      ########## End - ETag Optimization
       
       
      ########## Begin - Automatic compression of resources
      # Compress text, html, javascript, css, xml, kudos to Komra.de
      # May kill access to your site for old versions of Internet Explorer
      # The server needs to be compiled with mod_deflate otherwise it will send HTTP 500 Error.
      # mod_deflate is not available on Apache 1.x series. Can only be used with Apache 2.x server.
      # AddOutputFilterByType is now deprecated by Apache. Use mod_filter in the future.
      AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
      ########## Begin - Optimal default expiration time
      ## Note: this might cause problems and you might have to comment it out by
      ## placing a hash in front of this section's lines
      <IfModule mod_expires.c>
          # Enable expiration control
          ExpiresActive On
       
          # Default expiration: 1 hour after request
          ExpiresDefault "now plus 1 hour"
       
          # CSS and JS expiration: 1 week after request
          ExpiresByType text/css "now plus 1 week"
          ExpiresByType application/javascript "now plus 1 week"
          ExpiresByType application/x-javascript "now plus 1 week"
       
          # Image files expiration: 1 month after request
          ExpiresByType image/bmp "now plus 1 month"
          ExpiresByType image/gif "now plus 1 month"
          ExpiresByType image/jpeg "now plus 1 month"
          ExpiresByType image/jp2 "now plus 1 month"
          ExpiresByType image/pipeg "now plus 1 month"
          ExpiresByType image/png "now plus 1 month"
          ExpiresByType image/svg+xml "now plus 1 month"
          ExpiresByType image/tiff "now plus 1 month"
          ExpiresByType image/vnd.microsoft.icon "now plus 1 month"
          ExpiresByType image/x-icon "now plus 1 month"
          ExpiresByType image/ico "now plus 1 month"
          ExpiresByType image/icon "now plus 1 month"
          ExpiresByType text/ico "now plus 1 month"
          ExpiresByType application/ico "now plus 1 month"
          ExpiresByType image/vnd.wap.wbmp "now plus 1 month"
          ExpiresByType application/vnd.wap.wbxml "now plus 1 month"
          ExpiresByType application/smil "now plus 1 month"
       
          # Audio files expiration: 1 month after request
          ExpiresByType audio/basic "now plus 1 month"
          ExpiresByType audio/mid "now plus 1 month"
          ExpiresByType audio/midi "now plus 1 month"
          ExpiresByType audio/mpeg "now plus 1 month"
          ExpiresByType audio/x-aiff "now plus 1 month"
          ExpiresByType audio/x-mpegurl "now plus 1 month"
          ExpiresByType audio/x-pn-realaudio "now plus 1 month"
          ExpiresByType audio/x-wav "now plus 1 month"
       
          # Movie files expiration: 1 month after request
          ExpiresByType application/x-shockwave-flash "now plus 1 month"
          ExpiresByType x-world/x-vrml "now plus 1 month"
          ExpiresByType video/x-msvideo "now plus 1 month"
          ExpiresByType video/mpeg "now plus 1 month"
          ExpiresByType video/mp4 "now plus 1 month"
          ExpiresByType video/quicktime "now plus 1 month"
          ExpiresByType video/x-la-asf "now plus 1 month"
          ExpiresByType video/x-ms-asf "now plus 1 month"
      </IfModule>
      ########## End - Optimal expiration time
       
      ########## End - Automatic compression of resources
      ###################################################
      ##----------------Block Bad Guys-----------------##
      ###################################################
      ########## Begin - Add optional bad user agent or IP blocking code
      #
      # If you need to block certain user agents or IP addresses and
      # other signatures, place that code here. Ensure the rules use
      # the correct RewriteRule syntax and the [F] flag.
      #
      ########## End - Add optional bad user agent or IP blocking code
       
      ########## 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!
      #
      # If the request query string contains /proc/self/environ (by SigSiu.net)
      RewriteCond %{QUERY_STRING} proc/self/environ [OR]
      # Block out any script trying to set a mosConfig value through the URL
      # (these attacks wouldn't work w/out Joomla! 1.5's Legacy Mode plugin)
      RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
      # Block out any script trying to base64_encode or base64_decode data within the URL
      RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*\([^)]*\) [OR]
      ## IMPORTANT: If the above line throws an HTTP 500 error, replace it with these 2 lines:
      # RewriteCond %{QUERY_STRING} base64_encode\(.*\) [OR]
      # RewriteCond %{QUERY_STRING} base64_decode\(.*\) [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 .* index.php [F]
      #
      ########## End - Rewrite rules to block out some common exploits
       
      ########## Begin - File injection protection, by SigSiu.net
      RewriteCond %{REQUEST_METHOD} GET
      RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
      RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [OR]
      RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC]
      RewriteRule .* - [F]
      ########## End - File injection protection
       
      ########## Begin - Basic antispam Filter, by SigSiu.net
      ## I removed some common words, tweak to your liking
      ## This code uses PCRE and works only with Apache 2.x.
      ## This code will NOT work with Apache 1.x servers.
      RewriteCond %{QUERY_STRING} \b(ambien|blue\spill|cialis|cocaine|ejaculation|erectile)\b [NC,OR]
      RewriteCond %{QUERY_STRING} \b(erections|hoodia|huronriveracres|impotence|levitra|libido)\b [NC,OR]
      RewriteCond %{QUERY_STRING} \b(lipitor|phentermin|pro[sz]ac|sandyauer|tramadol|troyhamby)\b [NC,OR]
      RewriteCond %{QUERY_STRING} \b(ultram|unicauca|valium|viagra|vicodin|xanax|ypxaieo)\b [NC]
      ## Note: The final RewriteCond must NOT use the [OR] flag.
      RewriteRule .* - [F]
      ## Note: The previous lines are a "compressed" version
      ## of the filters. You can add your own filters as:
      ## RewriteCond %{QUERY_STRING} \bbadword\b [NC,OR]
      ## where "badword" is the word you want to exclude.
      ########## End - Basic antispam Filter, by SigSiu.net
       
       
      ## Disallow visual fingerprinting of Joomla! sites (module position dump)
      ## handle template and tmpl query parameters
      RewriteCond %{QUERY_STRING} (^|&)tmpl=(component|system) [NC]
      RewriteRule .* - [L]
      RewriteCond %{QUERY_STRING} (^|&)t(p|emplate|mpl)= [NC]
      RewriteRule .* - [F]
       
      ## Disallow access to htaccess.txt, configuration.php, configuration.php-dist and php.ini
      RewriteRule ^(htaccess\.txt|configuration\.php(-dist)?|php\.ini)$ - [F]
       
      ########## End - Advanced server protection - query strings, referrer and config
      ## Disallow front-end access for certain Joomla! system directories
      RewriteRule ^includes/js/ - [L]
      RewriteRule ^(cache|includes|language|libraries|logs|tmp)/ - [F]
       
      ########## Begin - Advanced server protection - paths and files
      # Advanced server protection, version 3.2 - May 2011
      # by Nicholas K. Dionysopoulos
       
      ## Back-end protection
      ## This also blocks fingerprinting attacks browsing for XML and INI files
      RewriteRule ^administrator/?$ - [L]
      RewriteRule ^administrator/index\.(php|html?)$ - [L]
      RewriteRule ^administrator/index[23]\.php$ - [L]
      RewriteRule ^administrator/(components|modules|templates|images|plugins)/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov)$ - [L]
      RewriteRule ^administrator/ - [F] 
       
       ########## Block bad user agents
       ## The following list may include bots that no longer exist or are not a problem
       ## for your site. The list will always be incomplete and it is therefore wise to
       ## follow discussions on one of the many "security" mailing lists or on a forum
       ## such as http://www.webmasterworld.com/search_engine_spiders/
       ## It is also unwise to rely on this list as your ONLY security mechanism.
       RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
       RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
       RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
       RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
       RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
       RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
       RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
       RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
       RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
       RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
       RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
       RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
       RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
       RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
       RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
       RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
       RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
       RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
       RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
       RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
       RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
       RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
       RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
       RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
       RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
       RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
       RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
       RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
       RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
       RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
       RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
       RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
       RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
       RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
       RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
       RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
       RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
       RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
       RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
       
       RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
       RewriteCond %{HTTP_USER_AGENT} ^Zeus
       ## Note: The final RewriteCond must NOT use the [OR] flag.
       
       ## Return 403 Forbidden error.
       RewriteRule .* - [F]
       
        ServerSignature Off
       RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
       RewriteCond %{THE_REQUEST} (\\r|\\n|%0A|%0D) [NC,OR]
       
       RewriteCond %{HTTP_REFERER} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
       RewriteCond %{HTTP_COOKIE} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
       RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|”>|”<|/|\\\.\.\\).{0,9999} [NC,OR]
       
       RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
       RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget) [NC,OR]
       RewriteCond %{HTTP_USER_AGENT} (winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
       RewriteCond %{HTTP_USER_AGENT} (libwww-perl|curl|wget|python|nikto|scan) [NC,OR]
       RewriteCond %{HTTP_USER_AGENT} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
       
       #Block mySQL injects
       RewriteCond %{QUERY_STRING} (;|<|>|’|”|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark) [NC,OR]
       
       RewriteCond %{QUERY_STRING} \.\./\.\. [OR]
       
       RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
       RewriteCond %{QUERY_STRING} \.[a-z0-9] [NC,OR]
       RewriteCond %{QUERY_STRING} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC]
       # Note: The final RewriteCond must NOT use the [OR] flag.
       
       # Return 403 Forbidden error.
       RewriteRule .* index.php [F]
       
       ########## Begin - Redirect index.php to /
      ## Note: Change example.com to reflect your own domain name
      RewriteCond %{THE_REQUEST} !^POST
      RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
      RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
      RewriteRule ^index\.php$ http%2://www.example.com/$1 [R,L]
      ## If the above line throws a 500 error, change [R,L] to [R,L]
      ########## End - Redirect index.php to /
       
      ###################################################
      ##------------------Allow Access-----------------##
      ###################################################
       
      ########## Begin - Advanced server protection rules exceptions ####
      ##
      ## These are sample exceptions to the Advanced Server Protection 3.1
      ## rule set further down this file.
      ##
      ## Add more rules to single PHP files here change(your_template_folder) 
      RewriteRule ^templates\/your_template_folder/ - [L]
      ## I found this necessary for @fontface fonts
      RewriteRule ^templates\/your_template_folder\/fonts/ - [L]
      ##Yoo Themes Widgetkit and Zoo will not display css styles or images correctly if the cache folder access is blocked
      RewriteRule ^cache\/widgetkit/ - [L]
      RewriteRule ^cache\/com_zoo/ - [L]
      RewriteRule ^cache\/com_templates/ - [L]
      RewriteRule ^cache\/template/ - [L]
      RewriteRule ^cache\/plg_jch_optimize/ - [L]
       
      ## Allow UddeIM CAPTCHA
      #RewriteRule ^components/com_uddeim/captcha15\.php$ - [L]
      ## Allow Phil Taylor's Turbo Gears
      #RewriteRule ^plugins/system/GoogleGears/gears-manifest\.php$ - [L]
      ## Allow JoomlaWorks AllVideos
      #RewriteRule ^plugins/content/jw_allvideos/includes/jw_allvideos_scripts\.php$ - [L]
      ## Allow Admin Tools Joomla! updater to run
      RewriteRule ^administrator/components/com_admintools/restore\.php$ - [L]
      ## Allow Akeeba Backup Professional's integrated restoration script to run
      RewriteRule ^administrator/components/com_akeeba/restore\.php$ - [L]
      ## Allow Akeeba Kickstart
      RewriteRule ^kickstart\.php$ - [L]
      ##### Advanced server protection rules exceptions -- END
       
      ## Allow Agora attachments, but not PHP files in that directory!
      #RewriteCond %{REQUEST_FILENAME} !(\.php)$
      #RewriteCond %{REQUEST_FILENAME} -f
      #RewriteRule ^components/com_agora/img/members/ - [L]
       
      # Add more rules for allowing full access (except PHP files) on more directories here
       
      ## Uncomment to allow full access to the cache directory (strongly not recommended!)
      #RewriteRule ^cache/ - [L]
      ## Uncomment to allow full access to the tmp directory (strongly not recommended!)
      #RewriteRule ^tmp/ - [L]
       
      # Add more full access rules here
       
      ########## End - Advanced server protection rules exceptions ####
       
      ## Explicitly allow access only to XML-RPC's xmlrpc/index.php or plain xmlrpc/ directory
      RewriteRule ^xmlrpc/(index\.php)?$ - [L]
      RewriteRule ^xmlrpc/ - [F]
       
      ## Allow limited access for certain Joomla! system directories with client-accessible content
      RewriteRule ^(components|modules|plugins|templates)/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov)$ - [L]
      ## Uncomment this line if you have extensions which require direct access to their own
      ## custom index.php files. Note that this is UNSAFE and the developer should be ashamed
      ## for being so lame, lazy and security unconscious.
      # RewriteRule ^(components|modules|plugins|templates)/([^/]+/)*(index\.php)?$ - [L]
      ## Uncomment the following line if your template requires direct access to PHP files
      ## inside its directory, e.g. GZip compressed copies of its CSS files
      RewriteRule ^templates/([^/]+/)*([^/.]+\.)+php$ - [L]
      RewriteRule ^(components|modules|plugins|templates)/ - [F]
       
      ## Disallow access to rogue PHP files throughout the site, unless they are explicitly allowed
      RewriteCond %{REQUEST_FILENAME} \.php$
      RewriteCond %{REQUEST_FILENAME} !/index[23]?\.php$
      ## The next line is to explicitly allow the forum post assistant(fpa-xx)script to run
      RewriteCond %{REQUEST_FILENAME} !/fpa-[a-z]{2}\.php
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule ^([^/]+/)*([^/.]+\.)+php$ - [F]
       
      ########## End - Advanced server protection - paths and files
       
      ###################################################
      ##-------------------Redirects-------------------##
      ###################################################
      ########## Begin - Google Apps redirection, by Komra.de
      ## Uncomment the following line to enable:
      # RewriteRule ^mail http://mail.google.com/a/example.com [R,L]
      ## If the above doesn't work on your server, try this:
      ## RewriteRule ^mail http://mail.google.com/a/example.com [R,L]
      ########## End - Google Apps redirection
       
      ########## Begin - Custom redirects
      #
      # If you need to redirect some pages, place that code here. Ensure those
      # redirects use the correct RewriteRule syntax and the [R,L] flags.
      #
      ########## End - Custom redirects
       
      ########## Begin - Redirect (www.)olddomain.com to http://www.example.com
      ## Note: olddomain.com is your old domain name, you want to redirect FROM,
      ## whereas http://www.example.com is the new domain name you want to redirect TO.
      ## Change those names to reflect your current configuration. Remember, this
      ## small part of the file is supposed to be placed in http://www.olddomain.com!
      ## Note: Replace [R,L] with [R,L] if you get error 500.
      ## Uncomment the following lines to enable:
      #RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com [NC]
      #RewriteRule (.*) http://www.example.com/$1 [R,L]
      ## Note: The above section is only required if you are changing your domain name.
      ########## End - Redirect (www.)olddomain.com to http://www.example.com
       
      ########## Begin - Force HTTPS for certain pages
      # Force the page foobar.html to run in HTTPS mode, no matter what Joomla! says.
      # This is a sample redirection for foobar.html. Do note that you have to change
      # http://www.example.com to reflect your own domain. Remember to escape the dots using
      # \. in the left hand side of each rule. You need BOTH LINES PER URL for the rule
      # to work.
      RewriteCond %{SERVER_PORT} !^443$
      ## Alternatively, comment the above line and uncomment the following line:
      # RewriteCond %{HTTPS} ^off$ [NC]
      #RewriteRule ^foobar\.html$ https://www.example.com/foobar.html [R,L]
      ## NOTE: If you get an HTTP 500 error, please swap [R,L] with [R,L]
      # Add more rules below this line as required
      ########## End - Force HTTPS for certain pages
       
       
       
      ########## Begin - Redirect non-www to www
      #RewriteCond %{HTTP_HOST} !^www\. [NC]
      #RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R,L]
      ## If the above throws an HTTP 500 error, swap [R,L] with [R,L]
      ########## End - Redirect non-www to www
       
      ########## Begin - Redirect www to non-www
      ## WARNING: Comment out the non-www to www rule if you choose to use this
      # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
      # RewriteRule ^(.*)$ http://%1/$1 [R,L]
      ## If the above throws an HTTP 500 error, swap [R,L] with [R,L]
      ########## End - Redirect non-www to www
       
      ########## Begin - Custom internal rewrites
      #
      # If you need to internally rewrite some specific URL requests,
      # place that code here. Ensure those internal rewrites use the
      # correct RewriteRule syntax without domain name and with [L] flag.
      #
      ########## End - Custom internal rewrites
       
      ########## Begin - Joomla! core SEF Section
      #
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
      #
      # 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 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|ini|zip|json|file))$ [NC]
      # and the requested path and file doesn't directly match a physical file
      RewriteCond %{REQUEST_FILENAME} !-f
      # and the requested path doesn't directly match a physical folder
      RewriteCond %{REQUEST_FILENAME} !-d
      # internally rewrite the request to the index.php script
      RewriteRule .* index.php [L]
      #
      ########## End
       

      The only thing I changed from the original was the www rewrite rule since i'm accessing via IP.

      Followsymlinks is necessary for me. Site doesn't load properly without it. (I only bring it up because some have suggested turning it off for SEO)
    • yaani's Avatar
    • yaani
    • Elite Rocketeer
    • Posts: 869
    • Thanks: 5

    Re: Error after transfer to host

    Posted 12 years 2 months ago
    • Here is my .htaccess file, I am using sh404SEF but the code below says it is for core SEF, not sure why it works but it does. The last line is to use PHP 5.3 . I used Admin Tools to generate the .htaccess file (not sure if the free version will generate .htaccess files, I use the pro version)

      Try uncommenting the RewriteBase / line

      Maybe make sure your live_site parameter has a value in it in the configuration.php file.
      ### ===========================================================================
      ### Security Enhanced & Highly Optimized .htaccess File for Joomla!
      ### automatically generated by Admin Tools 2.2.5 on 2012-05-10 17:25:12 GMT
      ### Auto-detected Apache version: 2.0 (best guess)
      ### ===========================================================================
      ###
      ### The contents of this file are based on the same author's work "Master
      ### .htaccess", published on http://snipt.net/nikosdion/the-master-htaccess
      ###
      ### Admin Tools is Free Software, distributed under the terms of the GNU
      ### General Public License version 3 or, at your option, any later version
      ### published by the Free Software Foundation.
      ###
      ### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ### !!                                                                       !!
      ### !!  If you get an Internal Server Error 500 or a blank page when trying  !!
      ### !!  to access your site, remove this file and try tweaking its settings  !!
      ### !!  in the back-end of the Admin Tools component.                        !!
      ### !!                                                                       !!
      ### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      ###
       
      ##### RewriteEngine enabled - BEGIN
      RewriteEngine On
      ##### RewriteEngine enabled - END
       
      ##### RewriteBase set - BEGIN
      RewriteBase /
      ##### RewriteBase set - END
       
      ##### File execution order -- BEGIN
      DirectoryIndex index.php index.html
      ##### File execution order -- END
       
      ##### No directory listings -- BEGIN
      IndexIgnore *
      Options All -Indexes
      ##### No directory listings -- END
       
      ##### Redirect index.php to / -- BEGIN
      RewriteCond %{THE_REQUEST} !^POST
      RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
      RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
      RewriteRule ^index\.php$ http%2://www.texasprokartchallenge.com/ [R,L]
      ##### Redirect index.php to / -- END
      ##### Rewrite rules to block out some common exploits -- BEGIN
      RewriteCond %{QUERY_STRING} proc/self/environ [OR]
      RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
      RewriteCond %{QUERY_STRING} base64_(en|de)code\(.*\) [OR]
      RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
      RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
      RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
      RewriteRule .* index.php [F]
      ##### Rewrite rules to block out some common exploits -- END
      ##### File injection protection -- BEGIN
      RewriteCond %{REQUEST_METHOD} GET
      RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
      RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [OR]
      RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC]
      RewriteRule .* - [F]
      ##### File injection protection -- END
       
      ##### Advanced server protection rules exceptions -- BEGIN
      RewriteRule ^administrator\/components\/com_akeeba\/restore\.php$ - [L]
      RewriteRule ^administrator\/components\/com_admintools\/restore\.php$ - [L]
      RewriteRule ^administrator\/components\/com_extplorer\/fetchscript\.php$ - [L]
      RewriteCond %{REQUEST_FILENAME} !(\.php)$
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule ^cache\/jw_sigpro/ - [L]
      RewriteCond %{REQUEST_FILENAME} !(\.php)$
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule ^cache\/widgetkit/ - [L]
      RewriteRule ^templates\/rt_momentum/ - [L]
      ##### Advanced server protection rules exceptions -- END
       
      ##### Advanced server protection -- BEGIN
       
      RewriteCond %{QUERY_STRING} \=PHP[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12} [NC]
      RewriteRule .* - [F]
      ## Back-end protection
      RewriteRule ^administrator/?$ - [L]
      RewriteRule ^administrator/index\.(php|html?)$ - [L]
      RewriteRule ^administrator/index[23]\.php$ - [L]
      RewriteRule ^administrator/(components|modules|templates|images|plugins)/.*\.(jpe|jpg|jpeg|jp2|jpe2|png|gif|bmp|css|js|swf|html|mpg|mp3|mpeg|mp4|avi|wav|ogg|ogv|xls|xlsx|doc|docx|ppt|pptx|zip|rar|pdf|xps|txt|7z|svg|odt|ods|odp|flv|mov|htm|ttf|woff|eot)$ - [L]
      RewriteRule ^administrator/ - [F]
      ## Explicitly allow access only to XML-RPC's xmlrpc/index.php or plain xmlrpc/ directory
      RewriteRule ^xmlrpc/(index\.php)?$ - [L]
      RewriteRule ^xmlrpc/ - [F]
      ## Allow limited access for certain Joomla! system directories with client-accessible content
      RewriteRule ^(components|modules|templates|images|plugins|media|libraries)/.*\.(jpe|jpg|jpeg|jp2|jpe2|png|gif|bmp|css|js|swf|html|mpg|mp3|mpeg|mp4|avi|wav|ogg|ogv|xls|xlsx|doc|docx|ppt|pptx|zip|rar|pdf|xps|txt|7z|svg|odt|ods|odp|flv|mov|ico|htm|ttf|woff|eot)$ - [L]
      RewriteRule ^(components|modules|templates|images|plugins|media|libraries)/.*index\.php - [L]
      RewriteRule ^(components|modules|templates|images|plugins|media|libraries)/ - [F]
      ## Disallow front-end access for certain Joomla! system directories (unless access to their files is allowed above)
      RewriteRule ^includes/js/ - [L]
      RewriteRule ^(cache|includes|language|logs|tmp)/ - [F]
       
      ## Disallow access to rogue PHP files throughout the site, unless they are explicitly allowed
      RewriteCond %{REQUEST_FILENAME} (\.php)$
      RewriteCond %{REQUEST_FILENAME} !(/index[23]?\.php)$
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule (.*\.php)$ - [F]
      ## Disallow access to htaccess.txt, php.ini and configuration.php-dist
      RewriteRule ^(htaccess\.txt|configuration\.php-dist|php\.ini)$ - [F]
      ##### Advanced server protection -- END
       
      ##### Joomla! core SEF Section -- BEGIN
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
      RewriteCond %{REQUEST_URI} !^/index\.php
      RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|raw|ini|zip|json|file|vcf))$ [NC]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule .* index.php [L]
      ##### Joomla! core SEF Section -- END
       
      # Use PHP 5.3
      AddType application/x-httpd-php53 .php 
       

      I think modules were created automatically on module install in Joomla 1.5 but I don't think they are any more in Joomla 2.5. I think you have to create them yourself after you install the module with Joomla 2.5
  • Re: Error after transfer to host

    Posted 12 years 2 months ago
    • Thank you so much for the time and attention. I'm going to try the same route for SEO (pending the free version working). I still get 404's using your htaccess and joomla core. I will report back :)

      Thanks again!
    • yaani's Avatar
    • yaani
    • Elite Rocketeer
    • Posts: 869
    • Thanks: 5

    Re: Error after transfer to host

    Posted 12 years 2 months ago
    • Try turning off any cache while you are making changes to the .htaccess file.

      Try enabling the Joomla SEF urls without the .htaccess file first. (Global Configuration>SEO Settings>Use URL rewriting>No

      After you get the SEF urls working without .htaccess try it with the .htaccess

      Here is another .htaccess file I have on another 2.5 site (comment out the the 3rd party SEF & uncomment the Core SEF)
      ##
      # @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
      # @package Joomla
      # @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
      # @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
      # Joomla! is Free Software
      ##
       
       
      #####################################################
      #  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
      #
      # The line just below this section: 'Options +FollowSymLinks' may cause problems
      # with some server configurations.  It is required for use of mod_rewrite, but may already
      # be set by your server administrator in a way that dissallows changing it in
      # your .htaccess file.  If using it causes your server to error out, comment it out (add # to
      # beginning of line), reload your site in your browser and test your sef url's.  If they work,
      # it has been set by your server administrator and you do not need it set here.
      #
      #####################################################
       
      ##  Can be commented out if causes errors, see notes above.
      Options +FollowSymLinks
       
      #
      #  mod_rewrite in use
       
      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!
      #
      ## Deny access to extension xml files (uncomment out to activate)
      <Files ~ "\.xml$">
      Order allow,deny
      Deny from all
      Satisfy all
      </Files>
      ## End of deny access to extension xml files
      RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
      # Block out any script trying to base64_encode crap to send via URL
      RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
      # Block out any script that includes a <script> tag in URL
      RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%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})
      # Send all blocked request to homepage with 403 Forbidden error!
      RewriteRule ^(.*)$ index.php [F,L]
      #
      ########## End - Rewrite rules to block out some common exploits
       
      #  Uncomment following line if your webserver's URL
      #  is not directly related to physical file paths.
      #  Update Your Joomla! Directory (just / for root)
      RewriteBase /
       
       
      ########## Begin - Joomla! core SEF Section
      #
      #RewriteCond %{REQUEST_FILENAME} !-f
      #RewriteCond %{REQUEST_FILENAME} !-d
      #RewriteCond %{REQUEST_URI} !^/index.php
      #RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
      #RewriteRule (.*) index.php
      #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
      #
      ########## End - Joomla! core SEF Section
       
       
      ########## Begin - 3rd Party SEF Section
      ############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
      #
      RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]           ##optional - see notes##
      RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule (.*) index.php
      #
      ########## End - 3rd Party SEF Section
      <IfModule mod_suphp.c>
       suPHP_ConfigPath /home/alecude
       <Files php.ini>
          order allow,deny
          deny from all
       </Files>
      </IfModule>
       
      #Added by Yaani-Mai Gaddy 06/18/12
      # Use PHP 5.3
      AddType application/x-httpd-php53 .php

      Is your Joomla installation in the root? If it is not in the root directory then you will have to change the "RewriteBase /" to "RewriteBase /subdirectoryname/"

Time to create page: 0.065 seconds