We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16702 ☆ A M B ☆
    • 536 Posts
    i use Google Webmaster Tools and some of my sites have 100-400 not founded page`s...HOW can i fix this? Some tips?
    Thanks
      palma non sine pulvere
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      You could redirect any 404’s to the right page. I use Redirector for that on my own site. You can just enter the 404 link (nonexistantpage.html) and link it to the right one ([[~45]]).

      I also created a simple plugin called Notify404 which is also in the Package Manager and sends an email when MODX serves a 404 page, which can help you locate where errors come from. With a lot of 404’s / script kiddies that will send quite some emails though tongue
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 16702 ☆ A M B ☆
        • 536 Posts
        Quote from: Mark at May 20, 2011, 05:12 AM

        You could redirect any 404’s to the right page. I use Redirector for that on my own site. You can just enter the 404 link (nonexistantpage.html) and link it to the right one ([[~45]]).

        I also created a simple plugin called Notify404 which is also in the Package Manager and sends an email when MODX serves a 404 page, which can help you locate where errors come from. With a lot of 404’s / script kiddies that will send quite some emails though tongue

        this ’Redirector’ is plugin or Snipet and can you provide the code?
        Thanks smiley))
          palma non sine pulvere
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          It’s a 3PC (third party component) / Extra / Package which you can simply install via the package manager as well smiley

          It installs into the "Components" menu and is quite straightforward to use.
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 16702 ☆ A M B ☆
            • 536 Posts
            for EVO?
              palma non sine pulvere
              • 18373 ☆ A M B ☆
              • 3,141 Posts
              Oh, no.

              Both Redirector and Notify404 are for Revolution, sorry.


              It wouldn’t be too hard to write a plugin that triggers on the OnPageNotFound event that looks into a database, a textfile or just an inline array to find where to redirect to. Just slightly harder to maintain then.

              Another option would be to use .htaccess redirects - if you google for that you’ll find a lot of information about that.
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 16702 ☆ A M B ☆
                • 536 Posts
                i try:

                RewriteRule ^http://www.abv.bg/thefile http://www.newsite.com/abvabv [R=301,L]


                but is not work for me smiley

                this is my htaccess:
                Options +FollowSymlinks
                RewriteEngine On
                RewriteBase /
                
                # Fix Apache internal dummy connections from breaking [(site_url)] cache
                RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
                RewriteRule .* - [F,L]
                
                # Exclude /assets and /manager directories and images from rewrite rules
                RewriteRule ^(manager|assets)/*$ - [L]
                RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
                
                # For Friendly URLs
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
                
                Options +FollowSymLinks
                RewriteEngine on
                RewriteCond %{HTTP_HOST} ^isa-holidays.com [NC]
                RewriteRule ^(.*)$ http://www.isa-holidays.com/$1 [L,R=301]
                
                # compress text, html, javascript, css, xml:
                AddOutputFilterByType DEFLATE text/plain
                AddOutputFilterByType DEFLATE text/html
                AddOutputFilterByType DEFLATE text/xml
                AddOutputFilterByType DEFLATE text/css
                AddOutputFilterByType DEFLATE application/xml
                AddOutputFilterByType DEFLATE application/xhtml+xml
                AddOutputFilterByType DEFLATE application/rss+xml
                AddOutputFilterByType DEFLATE application/javascript
                AddOutputFilterByType DEFLATE application/x-javascript
                
                # Or, compress certain file types by extension:
                <Files *.html>
                SetOutputFilter DEFLATE
                </Files>
                
                <ifModule mod_expires.c>
                  ExpiresActive On
                  ExpiresDefault "access plus 1 seconds"
                  ExpiresByType text/html "access plus 1 seconds"
                  ExpiresByType image/gif "access plus 2592000 seconds"
                  ExpiresByType image/jpeg "access plus 2592000 seconds"
                  ExpiresByType image/png "access plus 2592000 seconds"
                  ExpiresByType text/css "access plus 604800 seconds"
                  ExpiresByType text/javascript "access plus 216000 seconds"
                  ExpiresByType application/x-javascript "access plus 216000 seconds"
                </ifModule>
                <ifModule mod_headers.c>
                  <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
                    Header set Cache-Control "max-age=2592000, public"
                  </filesMatch>
                  <filesMatch "\\.(css)$">
                    Header set Cache-Control "max-age=604800, public"
                  </filesMatch>
                  <filesMatch "\\.(js)$">
                    Header set Cache-Control "max-age=216000, private"
                  </filesMatch>
                  <filesMatch "\\.(xml|txt)$">
                    Header set Cache-Control "max-age=216000, public, must-revalidate"
                  </filesMatch>
                  <filesMatch "\\.(html|htm|php)$">
                    Header set Cache-Control "max-age=1, private, must-revalidate"
                  </filesMatch>
                </ifModule>
                
                  palma non sine pulvere
                  • 16702 ☆ A M B ☆
                  • 536 Posts
                  i found the answer grin grin grin

                  http://modx.com/extras/package/ngredirect


                  NG!Redirect 0.0.2


                  BUT i make some changes in the code becose i use Friendly URL`s:

                  this:
                  		$docid = $modx->documentIdentifier;

                  must be:

                  		$docid = $_REQUEST['q'];
                    palma non sine pulvere
                    • 16702 ☆ A M B ☆
                    • 536 Posts
                    i have problem with URL`s like this:

                    http://www.domain.com/ru/spetspredlozheniya/paket-troe-vzroslyih-apartament&layout=button_count&show_faces=false&width=200&height=30&action=like&font=arial&colorscheme=light


                    when i have long URL with 2 or 3 parent folders, NG!Redirect 0.0.2 not work...have you ideas?
                      palma non sine pulvere
                      • 18373 ☆ A M B ☆
                      • 3,141 Posts
                      Besides that that link is not valid (missing a first query param startihg with a question mark), that is the problem probably - it is just looking for the "static" part of the link (remember your $_REQUEST[’q’]?).

                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.