The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Issue in Rewriting link in Whole Scripts

Discussion in 'General Discussion' started by SAMoooo, Jan 26, 2016.

  1. SAMoooo

    SAMoooo Registered

    Joined:
    Jan 26, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    saudi arabia
    cPanel Access Level:
    Root Administrator
    Hello ...
    I have installed two different Upload scripts ... and Both scripts didn't work and face the same issue !!! despite it's from different developer but facing the same issue !!!
    the visitor after uploading the files via ( file upload script ) .. the script generate a link .. But this link didn't work and showing the site HOME page instead of showing file download link .. despite i fine that files uploaded to my server !?? i have a VPS .. so what is your suggestion
     
  2. SAMoooo

    SAMoooo Registered

    Joined:
    Jan 26, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    saudi arabia
    cPanel Access Level:
    Root Administrator
    here is the content of htaccess file

    Code:
    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
        <IfModule mod_headers.c>
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
            AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
        <IfModule mod_mime.c>
            # DEFLATE by extension
            AddOutputFilter DEFLATE js css htm html xml
        </IfModule>
    </IfModule>
    # END W3TC Browser Cache
    # BEGIN W3TC CDN
    <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
    </FilesMatch>
    # END W3TC CDN
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        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 %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
        RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
        RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [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]
    </IfModule>
    
    # END WordPress
    
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure I understand the question. Are you having some sort of issue with your cPanel, or an issue with the script you're hoping to use? If its the latter, you'd need to speak with the author of the script. If you think that htaccess is causing some sort of issue, disable it by renaming it to htaccess.txt
     
  4. SAMoooo

    SAMoooo Registered

    Joined:
    Jan 26, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    saudi arabia
    cPanel Access Level:
    Root Administrator
    this is the htaccess for the script only

    Code:
    
    # override max php upload settings. Might not work on all servers
    #php_value upload_max_filesize 4000M
    #php_value post_max_size 4000M
    
    # setup xsendfile if the module is enabled
    <IfModule mod_xsendfile.c>
      <Files *.php>
        XSendFile On
        SetEnv MOD_X_SENDFILE_ENABLED 1
      </Files>
    </IfModule>
    
    # disable mod security
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>
    
    # redirect www to non-www
    #RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    #RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    
    RewriteEngine On
    #RewriteRule . - [E=no-gzip:1]
    RewriteBase /
    
    # forward app requests
    RewriteRule ^app/(.*) plugins/webdav/site/control/$1 [QSA,L]
    
    # route everything via index.php if it doesn't exist as a file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?_page_url=$1 [QSA]
    
    
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page