Jump to content

need help with .htaccess configuration


slaterino

Recommended Posts

Hi,

I have a Hostpay application installed on one of my domains which has required a rewrite of .htaccess. The Hostpay system uses index.cgi as default page and then uses .rhtml templates. I have a number of subdomains on this domain too and currently have to type in mydomain.com/index.php instead of mydomain.com/, for example. I am also having problems with a contact page which appends code such as &fillall or &success (i.e. contact.php&success) to the web address, which no longer works correctly on this domain. I know this must be because of the .htaccess file but don't know what I can change within this file so that index.cgi and index.php will both work. Here is the current file:

 

<IfModule mod_ssl.c>
RewriteBase /thghosting.co.uk/
</IfModule>
<IfModule !mod_ssl.c>
RewriteBase /
</IfModule>
RewriteEngine On
        RewriteRule ^([^.]*)$ index.cgi/$1 [L,NE]
RewriteEngine On
RewriteRule ^([^.]*)$ index.cgi/$1 [L]

 

I anyone can shed any light on what I can change in this configuration I would be really grateful as I don't really understand this at the moment.

 

Thanks,

Russ

Link to comment
https://forums.phpfreaks.com/topic/139443-need-help-with-htaccess-configuration/
Share on other sites

Why not use either index.php or index.cgi to forward to the other...whats what I would do.

 

To get them both to work is not very probable. You have to pick one and then make the other do a 301 redirect to the one you want.

 

The redirect can be done in the .htaccess or on the php/cgi side.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.