Jump to content
007basaran

Rewrite Setting Problem In Whmcs index.php

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

Share this post


Link to post
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

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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. :)

Share this post


Link to post
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.

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • By ModulesGarden
      Dear community,
      You recently gave us plenty of feedback regarding our products. This allowed us to narrow down the focus to the things you need the most in our software. Thank you!
      Today we would like to hear your opinion on yet another matter. 
      Do you use our Account Synchronization For WHMCS module?

      If so, please answer a few simple questions and help us understand how you are feeling about such features as account export/import. 
      Take the 1-minute survey!
    • By WGS
      MONSOON OFFERS at WGS
      > Flat 50% OFF on HostX WHMCS Template - No Coupon Code Required
      > Flat 50% OFF on ClientX WHMCS Template - Coupon Code: X50 
      > Flat 30% OFF on All WHMCS Modules  - Coupon Code: MONSOON
      > Flat 30% OFF on Open Source WHMCS Modules -  Coupon Code: MONSOON
       
       
       
       
    • By kan
      Hello
      I have integrated stripe into WHMCS and it work perfectly with whmcs client area. We have our own client area using WHMCS API, but when we click on "PayNow" in invoice it will re directs to WHMCS client area for payment instead of Stripe payment gateway. Currently I'm using paypal because it will re direct to their gateway for payment.
      Is there any solution in whmcs or in stripe?
       
    • By WGS
      US Independence Day Sale -  Flat 30% OFF On All Products
      Coupon Code: US30
       

       
    • By WGS
      We have recently introduced some exciting Summer offers on our WHMCS products. 
       
      1. Flat 50% OFF on our Theme & Templates
      Get 50% OFF on ClientX - WHMCS Client Area Theme - Use Coupon Code: X50
      Flat 50% on HostX WHMCS Theme - No Coupon Code Required. 
       
       
      2. Flat 30% OFF on New Cloud WHMCS Module
      Get flat 30% OFF on Hetzner WHMCS Module. Use Coupon Code: HETZ30
      Get flat 30% OFF on AWS Lightsail Server Provisioning WHMCS Module. Use Coupon Code: AWS30
       
       
       
       
       
       
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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