We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44314
    • 44 Posts
    Hello, I'm not sure where to post this or what best describes the problem in the post title. I've just noticed a strange occurrence on a revo site just built (on 2.2.8). All of a sudden the friendly url's have began to appear with ?q= in them.. so for example, a friendly url previously displayed as domain.com/about-us.html and now it displays as domain.com/?q=about-us.html

    And even stranger to me is that in the search results where a given page for the site is listed in the search results, even though the url in the search results appears as it should, it still clicks through to the correct page but that page's url has now obviously changed to include this ?q= in it (i'd thought it would maybe go to the 404-page instead given what's been inserted into the url's and the fact that now they've changed). It's done this throughout the entire website, and has placed the characters into the url of every page! Would anyone have any idea what this could possibly be?

    This question has been answered by bolero. See the first response.

      • 44314
      • 44 Posts
      It might also help to note the last tasks i carried out on the site- I'm logged in to the manager today, i've been creating 301 permanent redirects for url's that are showing in google webmaster tools as not being found (reason being this new modx site is a redesign so some url's have changed). The way i'm creating the 301 redirects is by going into cpanel and creating them there. When i do this, cpanel by default places the redirect at the bottom of the .htaccess file. So once i've made all my redirects this way, i go into the .htaccess file and move them from the bottom of the page/file to the top so that they take effect (i've been doing it this way all week with no problems and the 301's work perfectly without any affect on the url's so far / and it's definitely not caused odd characters to appear inside the url's anyway). So i wonder is this anything to do with it at all? Maybe not, but i thought i should mention it.
        • 10208 ☆ A M B ☆
        • 1,780 Posts
        I can't answer about the strange characters, but thought I'd mention the Redirector Extra available for Revolution. It's so much easier to manage the 301 redirects than messing about in .htaccess, and you can specify the resource ID instead of the URL which means if the alias ever changes, the redirect still works. Check it out: http://modx.com/extras/package/redirector
          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 44314
          • 44 Posts
          Thanks, that's interesting. I'll take a look at that smiley
          I've still not figured out why my url's have suddenly changed but the site at least still seems to be working in the meantime. I'll post once i have more info on this.
            • 22840
            • 1,572 Posts
            can you show the content of your .htaccess file here so we can have a look at it
              • 44314
              • 44 Posts
              # MODX supports Friendly URLs via this .htaccess file. You must serve web
              # pages via Apache with mod_rewrite to use this functionality, and you must
              # change the file name from ht.access to .htaccess.
              #
              # Make sure RewriteBase points to the directory where you installed MODX.
              # E.g., "/modx" if your installation is in a "modx" subdirectory.
              #
              # You may choose to make your URLs non-case-sensitive by adding a NC directive
              # to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
              
              RewriteEngine On
              RewriteBase /
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\-2\.html$ "http\:\/\/sovereignsailing\.com\/sailing\-courses\-ireland\-2" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^yacht\-charter\-ireland\.html$ "http\:\/\/www\.sovereignsailing\.com\/yacht\-charter\-ireland\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/2012\/12\/10\/last\-sun\-set\-of\-2012\!\/$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/2012\/12\/10\/last\-sunset\-of\-2012\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/2012\/08$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/2012\/11\/15\/sailing\-to\-the\-fastnet\/$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/2012\/11\/15\/sailing\-to\-the\-fastnet\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/2012\/08\/17\/hello\-world\/$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^bbcharter\.htm$ "http\:\/\/www\.sovereignsailing\.com\/yacht\-charter\-ireland\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^west\-cork\-sailing\-trips\.htm$ "http\:\/\/www\.sovereignsailing\.com\/sailing\-trips\-ireland\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^about\.htm$ "http\:\/\/www\.sovereignsailing\.com\/about\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^marina\.htm$ "http\:\/\/www\.sovereignsailing\.com\/marina\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^yacht\-racing\-regattas\-west\-cork\.htm$ "http\:\/\/www\.sovereignsailing\.com\/yacht\-racing\-regattas\-west\-cork\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^resources\.htm$ "http\:\/\/www\.sovereignsailing\.com\/marina\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-gift\-vouchers\.htm$ "http\:\/\/www\.sovereignsailing\.com\/sailing\-gift\-vouchers\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^group\-sailing\-ireland\.htm$ "http\:\/\/www\.sovereignsailing\.com\/group\-sailing\-ireland\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\.htm$ "http\:\/\/www\.sovereignsailing\.com\/sailing\-courses\-ireland\-2\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^book\-online\.htm$ "http\:\/\/www\.sovereignsailing\.com\/book\-sailing\-online\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^yacht\-charter\-ireland\.htm$ "http\:\/\/www\.sovereignsailing\.com\/yacht\-charter\-ireland\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^\ sailing\-courses\-ireland\/essential\-navigation\-and\-seamanship\.htm$ "http\:\/\/www\.sovereignsailing\.com\/essential\-navigation\-and\-seamanship\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^index\.htm$ "http\:\/\/www\.sovereignsailing\.com\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^\ sailing\-courses\-ireland\/rya\-start\-yachting\.htm$ "http\:\/\/www\.sovereignsailing\.com\/rya\-start\-yachting\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^book\-sailing\-online\.htm$ "http\:\/\/www\.sovereignsailing\.com\/book\-sailing\-online\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\/$ "http\:\/\/www\.sovereignsailing\.com\/sailing\-courses\-ireland\-2\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\/rya\-yachtmaster\-shorebased\.htm$ "http\:\/\/www\.sovereignsailing\.com\/rya\-yachtmaster\-shorebased\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^resources\.html$ "http\:\/\/www\.sovereignsailing\.com\/marina\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/tags\/Fastnet$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/2012\/11\/15\/sailing\-to\-the\-fastnet\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^www\.sovereignsailing\.com\/$ "http\:\/\/www\.sovereignsailing\.com\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\/keelboats\.htm$ "http\:\/\/www\.sovereignsailing\.com\/sailing\-courses\-ireland\-keelboatss\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\/keelboats\.htm\ $ "http\:\/\/www\.sovereign\ sailing\.com\/sailing\-\ courses\-ireland\-keel\ boats\.html\ " [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/kontakt\.html$ "http\:\/\/www\.sovereignsailing\.com\/kontakt\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/standort\.html$ "http\:\/\/www\.sovereignsailing\.com\/standort\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\.html$ "http\:\/\/www\.sovereignsailing\.com\/sailing\-courses\-ireland\-2\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/beneteau\-411\-de\.html$ "http\:\/\/www\.sovereignsailing\.com\/beneteau\-411\-de\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/jeanneau\-43ds\-de\.html$ "http\:\/\/www\.sovereignsailing\.com\/jeanneau\-43ds\-de\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^ourTeam$ "http\:\/\/www\.sovereignsailing\.com\/about\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^contactus$ "http\:\/\/www\.sovereignsailing\.com\/contact\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^RaceCharter$ "http\:\/\/www\.sovereignsailing\.com\/yacht\-racing\-regattas\-west\-cork\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^\ sailing\-courses\-ireland\/day\-skipper\-shorebased\.htm$ "http\:\/\/www\.sovereignsailing\.com\/day\-skipper\-shorebased\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/sun\-odyssey\-40\-de\.html$ "http\:\/\/www\.sovereignsailing\.com\/hanse\-40\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^contact\.htm$ "http\:\/\/www\.sovereignsailing\.com\/contact\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^group\-sailing\-ireland\.html$ "http\:\/\/www\.sovereignsailing\.com\/corporate\-group\-sailing\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\-2\/$ "http\:\/\/www\.sovereignsailing\.com\/sailing\-courses\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-team\.html$ "http\:\/\/www\.sovereignsailing\.com\/about\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^kinsale\-marina\.html$ "http\:\/\/www\.sovereignsailing\.com\/marina\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/startseite\.html$ "http\:\/\/www\.sovereignsailing\.com\/startseite\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/yachtcharter\.html$ "http\:\/\/www\.sovereignsailing\.com\/yachtcharter\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/segelkurse\.html$ "http\:\/\/www\.sovereignsailing\.com\/segelkurse\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^explore\-our\-coast\.html$ "http\:\/\/www\.sovereignsailing\.com\/south\-west\-irish\-coast\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/hanse\-40\-de\.html$ "http\:\/\/www\.sovereignsailing\.com\/hanse\-40\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/jeanneau\-45ds\-de\.html$ "http\:\/\/www\.sovereignsailing\.com\/jeanneau\-45ds\-de\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/elan\-31\-de\.html$ "http\:\/\/www\.sovereignsailing\.com\/elan\-31\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/2012\/11$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/2012\/12$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^book\-online\.html$ "http\:\/\/www\.sovereignsailing\.com\/book\-sailing\-online\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^de\/elan\-340\-de\.html$ "http\:\/\/www\.sovereignsailing\.com\/elan\-31\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^elan\-340\-yacht\-for\-charter\.html$ "http\:\/\/www\.sovereignsailing\.com\/elan\-31\-yacht\-for\-charter\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^contact\.php$ "http\:\/\/www\.sovereignsailing\.com\/contact\.html" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/author\/SovereignSailing$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/tags\/kinsale$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/author\/blog\/latest\-news\/tags\/kinsale$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^blog\/latest\-news\/blog\/latest\-news\/2012\/08\/17\/hello\-world\/$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^sailing\-courses\-ireland\/blog\/latest\-news\/2012\/08$ "http\:\/\/www\.sovereignsailing\.com\/latest\-sailing\-news\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^index\.php$ "http\:\/\/www\.sovereignsailing\.com\/" [R=301,L]
              
              RewriteCond %{HTTP_HOST} !^(.*)\.sovereignsailing\.com$ [NC]
              RewriteRule ^(.*)$ http://www.sovereignsailing.com/$1 [R=301,L]
              
              # Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
              #RewriteCond %{HTTP_HOST} .
              #RewriteCond %{HTTP_HOST} !^sovereignsailing\.com [NC]
              #RewriteRule (.*) http://sovereignsailing.com/$1 [R=301,L]
              #
              # or for the opposite domain.com -> www.domain.com use the following
              # DO NOT USE BOTH
              #
              #RewriteCond %{HTTP_HOST} .
              #RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
              #RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
              
              # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 
              # https://www.domain.com when your cert only allows https://secure.domain.com
              #RewriteCond %{SERVER_PORT} !^443
              #RewriteRule (.*) https://sovereignsailing.com/$1 [R=301,L]
              
              # The Friendly URLs part
              RewriteCond %{REQUEST_FILENAME} !-f
              RewriteCond %{REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
              
              # Make sure .htc files are served with the proper MIME type, which is critical
              # for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
              
              #AddType text/x-component .htc
              
              # If your server is not already configured as such, the following directive
              # should be uncommented in order to set PHP's register_globals option to OFF.
              # This closes a major security hole that is abused by most XSS (cross-site
              # scripting) attacks. For more information: http://php.net/register_globals
              #
              # To verify that this option has been set to OFF, open the Manager and choose
              # Reports -> System Info and then click the phpinfo() link. Do a Find on Page
              # for "register_globals". The Local Value should be OFF. If the Master Value
              # is OFF then you do not need this directive here.
              #
              # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
              #
              # Your server does not allow PHP directives to be set via .htaccess. In that
              # case you must make this change in your php.ini file instead. If you are
              # using a commercial web host, contact the administrators for assistance in
              # doing this. Not all servers allow local php.ini files, and they should
              # include all PHP configurations (not just this one), or you will effectively
              # reset everything to PHP defaults. Consult www.php.net for more detailed
              # information about setting PHP directives.
              
              #php_flag register_globals Off
              
              # For servers that support output compression, you should pick up a bit of
              # speed by un-commenting the following lines.
              
              #php_flag zlib.output_compression On
              #php_value zlib.output_compression_level 5
              
              # The following directives stop screen flicker in IE on CSS rollovers. If
              # needed, un-comment the following rules. When they're in place, you may have
              # to do a force-refresh in order to see changes in your designs.
              
              #ExpiresActive On
              #ExpiresByType image/gif A2592000
              #ExpiresByType image/jpeg A2592000
              #ExpiresByType image/png A2592000
              #BrowserMatch "MSIE" brokenvary=1
              #BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
              #BrowserMatch "Opera" !brokenvary
              #SetEnvIf brokenvary 1 force-no-vary
              
              #RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              ##RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              #RewriteRule ^sailing\-courses\-ireland\-2\.html$ "http\:\/\/sovereignsailing\.com\/sailing\-courses\-ireland\-2" [R=301,L]
              
              RewriteCond %{HTTP_HOST} ^sovereignsailing\.com$ [OR]
              RewriteCond %{HTTP_HOST} ^www\.sovereignsailing\.com$
              RewriteRule ^yacht\-charter\-ireland\.html$ "http\:\/\/www\.sovereignsailing\.com\/yacht\-charter\-ireland\/" [R=301,L]
              
              
              
                • 44314
                • 44 Posts
                That's a copy of the .htaccess file, i couldn't see anything in it, and i'm not sure if this is even the cause. I just know the strange characters appeared in the site's url's whilst i was working in this file...
                  • 22840
                  • 1,572 Posts
                  Well I'm no expert to .htaccess but I do use it for rewrite rules and that just looks like its got too many \ in it.

                  Can you take out all the redirects temporally and see if it still does it ?, if it doesn't you will need to redo the rewrite rules.

                  Firstly decide if you want the site to show on the www.or the none www and un comment the redirects out on that by removing the # in front of the lines and updating the url's.

                  then try the following redirect rule as a posed to the ones you have in there, just try the one and if it works do the others :

                  RewriteRule ^sailing-courses-ireland-2.html http://www.sovereignsailing.com/rya-start-yachting.html [L,R=301]
                    • 44314
                    • 44 Posts
                    Ok, that's a great help. I'll try your suggestions. I didn't think there could be too many redirects, i've dealt with sites that have 100's which i guess is all part and parcel of a site that's been around a long time (or perhaps you're just referring to the "\" slashes). I really appreciate your input and i'll certainly report back on the results of your suggestions smiley
                      • 44314
                      • 44 Posts
                      Still confused with this, i did try to write a 301 redirect in the .htaccess file using the method you suggested Paul-

                      RewriteRule ^sailing-courses-ireland-2.html http://www.sovereignsailing.com/rya-start-yachting.html [L,R=301]

                      However this way of doing it does not work at all for me for some reason. So then i took out all the redirects for a moment to see if that changed anything, and then strangely the ?q= characters only disappeared from some url's on the site, with many pages though still containing them. I placed all of the redirects back into the file and now the ?q= characters are back again in every single url.. Baffled