Jump to content

Rewrite Setting Problem In Whmcs index.php


007basaran

Recommended Posts

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 by 007basaran
Link to comment
Share on other sites

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 ? 9_9

 

Link to comment
Share on other sites

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 ? 9_9

 

 

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

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... :twisted:

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. 9_9

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

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated