Hi .. Cleaning my URLs

by Toon-c
3 replies
Edited ..

mods remove please ..

#cleaning #urls
  • Profile picture of the author LovelyCornSyrup
    Here you go:

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.*).php HTTP/ [NC]
    RewriteRule .+ http://www.yourwebsite.com/%1  [R=301,QSA]
    Just replace 'yourwebsite.com' with the URL of your website, and save it with a .htaccess file extension. You might run into some errors, but it should get the job done.
    No fancy products, just stuff that works: The Gutenberg Diagram | Pareto Principle
    {{ DiscussionBoard.errors[2829891].message }}
    • Profile picture of the author espradley
      Make this your .htaccess file. It will revert all pages to Canotical URLs. Just replace somesite.com and http://www.somesite.com with your request.

      <IfModule mod_rewrite.c>
      RewriteEngine on
      # index.php to /
      RewriteCond %{THE_REQUEST} ^GET /.*/index.(php|html) HTTP
      RewriteRule (.*)index.(php|html)$ /$1 [R=301,L]
      # force www.
      rewritecond %{HTTP_HOST} ^somesite.com [nc]
      rewriterule ^(.*)$ http://www.somesite.com/$1 [r=301,nc]

      Eddie Spradley

      {{ DiscussionBoard.errors[2830902].message }}
      • Profile picture of the author Toon-c
        Hi ...

        can anyone help please ? the two codes given above gave me internal server error ...

        here is my .htaccess file, what can I add ?

        # -FrontPage-
        IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
        <Limit GET POST>
        order deny,allow
        deny from all
        allow from all
        <Limit PUT DELETE>
        order deny,allow
        deny from all
        AuthName mysite.com
        AuthUserFile /home/mysite/public_html/_vti_pvt/service.pwd
        AuthGroupFile /home/mysite/public_html/_vti_pvt/service.grp
        Options +FollowSymLinks
        RewriteEngine on
        RewriteCond %{HTTP_HOST} ^mysite.com [NC]
        RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
        suPHP_ConfigPath /home/mysite/public_html/php.ini
        HT Consulting S.A.R.L - Online marketing services - htconsulting.co
        Bluechain Solutions - Brand development services - bluechainsolutions.com
        {{ DiscussionBoard.errors[3041663].message }}

Trending Topics