×

php up to date

how to solve 301 url redirect issues on codeigniter project?

how to solve 301 url redirect issues on codeigniter project


#FORCE HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

<IfModule mod_rewrite.c>
  RewriteEngine On
  #RewriteBase /

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]

    # REMOVE INDEX.PHP
    RewriteRule (.+) index.php?p=$1 [QSA,L]

#www to non www
RewriteCond %{HTTP_HOST} ^www\.yourwebsite\.com$
RewriteRule ^/?$ "http\:\/\/yourwebsite\.com\/" [R=301,L]

</IfModule>


SHARE

website designer

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Thanks for your valuable feedback