slaterino Posted January 4, 2009 Share Posted January 4, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/139443-need-help-with-htaccess-configuration/ Share on other sites More sharing options...
premiso Posted January 4, 2009 Share Posted January 4, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/139443-need-help-with-htaccess-configuration/#findComment-729422 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.