007basaran Posted October 25, 2017 Share Posted October 25, 2017 (edited) Hello, # All PHP Requests remove extension .php .htaccess code : RewriteCond %{THE_REQUEST} ^GET\s.+\.php [NC] RewriteRule ^(.+)\.php$ /$1 [NE,R=301,L,NC] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}/$1.php -f RewriteRule ^(.*?)/?$ $1.php [L] # Whmcs Standart Rewrite Settings .htaccess code : ### BEGIN - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ### <IfModule mod_rewrite.c> RewriteEngine on # RewriteBase is set to "/" so rules do not need updating if the # installation directory is relocated. It is imperative that # there is also a RewriteCond rule later that can effectively get # the actual value by comparison against the request URI. # # If there are _any_ other RewriteBase directives in this file, # the last entry will take precedence! RewriteBase / # Redirect directories to an address with slash RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+[^/])$ $1/ [R] # Send all remaining (routable paths) through index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Determine and use the actual base RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$ RewriteRule ^.*$ %2index-system.php [QSA,L] </IfModule> ### END - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ### Whmcs index.php | Redirecting to = index Example : whmcs.com/index.php to whmcs.com/index Page not found error index php redirecting. How to block index.php redirection ? Can we disable index.php redirection without breaking the above code? Regards, Thanks. Edited October 25, 2017 by 007basaran Link to comment Share on other sites More sharing options...
007basaran Posted October 26, 2017 Author Share Posted October 26, 2017 Waiting for help. Topic Updated. Thanks... Link to comment Share on other sites More sharing options...
brian! Posted October 26, 2017 Share Posted October 26, 2017 5 minutes ago, 007basaran said: Waiting for help. you might be better off opening a ticket with support - it can be difficult to give generic answers to htaccess issues. 7 minutes ago, 007basaran said: Topic Updated. I thought the redirection problem was all solved by your dummy index.php file ? 1 Link to comment Share on other sites More sharing options...
007basaran Posted October 26, 2017 Author Share Posted October 26, 2017 27 minutes ago, brian! said: you might be better off opening a ticket with support - it can be difficult to give generic answers to htaccess issues. I thought the redirection problem was all solved by your dummy index.php file ? Normally the problem is solved, but the modules do not work properly because OAUTH and all functions are returned from the index.php file. Therefore, the problem of index.php file orientation should be resolved from the root and the default index.php file must be used. Link to comment Share on other sites More sharing options...
007basaran Posted October 26, 2017 Author Share Posted October 26, 2017 Brian do you open ticket in whmcs.com for me ? Link to comment Share on other sites More sharing options...
brian! Posted October 26, 2017 Share Posted October 26, 2017 1 hour ago, 007basaran said: Brian do you open ticket in whmcs.com for me ? no - I don't work for WHMCS, so you'll have to do it yourself... Link to comment Share on other sites More sharing options...
007basaran Posted October 26, 2017 Author Share Posted October 26, 2017 (edited) Edited October 26, 2017 by Matt Removed protected source code Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted October 26, 2017 WHMCS Developer Share Posted October 26, 2017 Using ANY decoded files of WHMCS is against the terms of service for WHMCS and can result in license suspension. Additionally, this is not the 7.3 version of the file. Link to comment Share on other sites More sharing options...
brian! Posted October 26, 2017 Share Posted October 26, 2017 10 minutes ago, WHMCS Andrew said: Using ANY decoded files of WHMCS is against the terms of service for WHMCS and can result in license suspension. and I would hope a ban from here too.... lol at him posting decoded files on the official WHMCS forums... 2 minutes ago, 007basaran said: Whmcs v5.2.15 index.php file. so you're using a file from almost 4 years ago and expecting it to work now and in the future... err ok, good luck with that. 31 minutes ago, 007basaran said: *Whmcs not support the developers or designers. did you even open a ticket with support? 31 minutes ago, 007basaran said: *Using this index.php and all problems fixed. you said the same yesterday with your dev index.php file. Link to comment Share on other sites More sharing options...
007basaran Posted October 31, 2017 Author Share Posted October 31, 2017 New Htaccess Code : RewriteCond %{THE_REQUEST} ^GET\s.+\.php [NC] RewriteCond %{REQUEST_URI} !^/index\.php [NC] RewriteRule ^(.+)\.php$ /$1 [NE,R=301,L,NC] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}/$1.php -f RewriteRule ^(.*?)/?$ $1.php [L] All fixed now. Link to comment Share on other sites More sharing options...
Recommended Posts