redirecting site.com/ to site.com

2 replies
Hello,

I have a wordpress website running wich automatically redirects it when I put a backslash to the end of an url.

So if my url is site.com/page1/
It would redirect site.com/page1/////// and site.com/page1 to site.com/page1/

Than I have another website where it would just show site.com/page1/////// if I would type that in. how can I fix this to all being sent to site.com/page1/ for every page?

Thanks in advance
#backslash #redirect #redirecting #site #sitecom #sitecom or
  • Profile picture of the author jbyte
    Have you looked at your .htaccess file to see how it is handling redirects?
    Signature

    I fix WordPress problems, PM me if you need help

    {{ DiscussionBoard.errors[9843668].message }}
    • Profile picture of the author stephanreek
      Originally Posted by jbyte View Post

      Have you looked at your .htaccess file to see how it is handling redirects?
      Yeah I have

      This is the code in my htacces

      Code:
      <IfModule mod_rewrite.c>
          RewriteEngine On
          RewriteBase /
          RewriteCond %{HTTPS} =on
          RewriteRule .* - [E=W3TC_SSL:_ssl]
          RewriteCond %{SERVER_PORT} =443
          RewriteRule .* - [E=W3TC_SSL:_ssl]
          RewriteCond %{HTTP:Accept-Encoding} gzip
          RewriteRule .* - [E=W3TC_ENC:_gzip]
          RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
          RewriteRule .* - [E=W3TC_PREVIEW:_preview]
          RewriteCond %{REQUEST_METHOD} !=POST
          RewriteCond %{QUERY_STRING} =""
          RewriteCond %{REQUEST_URI} /$
          RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|w3tc_logged_out|wptouch_switch_toggle) [NC]
          RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
          RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
          RewriteRule ^(.*)/+$ $1 [R=301,L]
      </IfModule>
      # END W3TC Page Cache core
      # BEGIN WordPress
      <IfModule mod_rewrite.c>
          RewriteEngine On
          RewriteBase /
          RewriteRule ^index.php$ - [L]
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule . /index.php [L]
          RewriteRule ^(.*)/+$ $1 [R=301,L]
      </IfModule>
      
      # END WordPress
      {{ DiscussionBoard.errors[9843775].message }}

Trending Topics