InterWorx Htaccess system?

Hello guys,

Just wondering if anyone has successfully had the .htaccess global only work in the main directory?

I have a subdomain and it’s in it’s folder /billing/ however the .htaccess isn’t working probably in there due to conflicts.

Hi

I hope you don’t mind, but I thought you could set to exclude or set full access etc to and folder in htaccess. I could be wrong though as I’m doing this from memory sorry.

Also, I’m not fully understanding what your trying to achieve or how htaccess is not working sorry

I hope that helps a little

Many thanks

John

Hello John mate,

Na the global directory is the public_html folder, in my case:

public_html/.htaccess has:


# Various rewrite rules.
<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME}\.php -f
 RewriteRule ^(.*)$ $1.php
</IfModule>

In my billing subdomain has:


RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php


RewriteCond %{REQUEST_URI} ^(.*)/install.php$
RewriteRule install.php %1/install/ [R=301,L]

The main site one works fine, however the billing subdomain gives a 404 not found.

I have to have the .htaccess disabled else it doesn’t work. I might be mistaken by my post as I don’t think it’s anything to do with the root after playing with the .htaccess code now.

Links currently go to: billing.licensecart.com/index.php/order/ or index.php/customers/login/ when that .htaccess should make go billing.licensecart.com/order/ or billing.licensecart.com/customers/login/

Thank you for your help.

Hey Michael,

In the billing .htaccess file you could attempt something like this:

RewriteBase /
RewriteRule order index.php/order

Let me know if that works out.

Hello Nathan,

Thank you I tried that and it doesn’t work for me this is the full .htaccess now above the Iworx one:


########################################################
# package:    minPHP
# filename:   .htaccess
########################################################


<Files ~ "\.(pdt)$">
   order deny,allow
   deny from all
</Files>


# Protect against Clickjacking
#Header append X-Frame-Options "SAMEORIGIN"


RewriteEngine on


# Force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]


RewriteBase /
RewriteRule order index.php/order



RewriteCond %{REQUEST_URI} ^(.*)/install.php$
RewriteRule install.php %1/install/ [R=301,L]


Original Blesta .htaccess:


########################################################
# package:    minPHP
# filename:   .htaccess
########################################################


<Files ~ "\.(pdt)$">
   order deny,allow
   deny from all
</Files>


# Protect against Clickjacking
#Header append X-Frame-Options "SAMEORIGIN"


RewriteEngine on


# Force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]


RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php


RewriteCond %{REQUEST_URI} ^(.*)/install.php$
RewriteRule install.php %1/install/ [R=301,L]

You can see the issue at: http://billing.licensecart.com/

I’ve not disabled the .htaccess yet.

[QUOTE=IWorx-Nathan;25499]Hey Michael,

In the billing .htaccess file you could attempt something like this:

RewriteBase /
RewriteRule order index.php/order

Let me know if that works out.[/QUOTE]

Hi Michael

I hope you don’t mind, but please see this link for your answer I believe.

I hope that helps a little

Many thanks

John

http://www.webmasterworld.com/apache/3163397.htm

Hi Michael

I hope you don’t mind, but I have given this a little thought, and although I am not familiar with your install/folders/etc, I would expect to be able to reference perhaps certain pages directly. Of course, I could be wrong as I do not know if you have any features which may stop direct reference sorry.

As an example, referencing http://licensecart.com/billing/plugin/order/main/index/blesta directly, displays as expected, however, when directly referencing http://billing.licensecart.com/plugin/order/main/index/blesta directly, fails.

Now, this could be because my logic for the correct paths are wrong, or it could be that it does not exist and only exists in the domain, not sub domain, or it could be the crm only operates/or is set within domain not sub domain. Sorry, this is my thinking and possible reasons for the above.

I suppose a quick test might be to set in your subdomain htaccess for rewrite to set it to domain link above which works, and test.

I hope that helps a little but I could be wrong, so I apologise in advance, and I know my last post was about domain/subdomain rewrite, but I thought it contained some good points.

Many thanks

John

Hi Michael

I’m sorry, last post but I also meant to ask, if you disable your rewrite rules, does the direct link then work as expected.

Many thanks

John

Sorry John forgot to update this thread :slight_smile: Me and brett was looking into it with Paul and ended up just giving up haha, yeah we’ve moved over to the licensecart.com/billing/ now instead :). Thank you for your help though much appreciated.

[QUOTE=d2d4j;25502]Hi Michael

I hope you don’t mind, but I have given this a little thought, and although I am not familiar with your install/folders/etc, I would expect to be able to reference perhaps certain pages directly. Of course, I could be wrong as I do not know if you have any features which may stop direct reference sorry.

As an example, referencing http://licensecart.com/billing/plugin/order/main/index/blesta directly, displays as expected, however, when directly referencing http://billing.licensecart.com/plugin/order/main/index/blesta directly, fails.

Now, this could be because my logic for the correct paths are wrong, or it could be that it does not exist and only exists in the domain, not sub domain, or it could be the crm only operates/or is set within domain not sub domain. Sorry, this is my thinking and possible reasons for the above.

I suppose a quick test might be to set in your subdomain htaccess for rewrite to set it to domain link above which works, and test.

I hope that helps a little but I could be wrong, so I apologise in advance, and I know my last post was about domain/subdomain rewrite, but I thought it contained some good points.

Many thanks

John[/QUOTE]