JasonO Posted January 17, 2008 Share Posted January 17, 2008 Hi there How would I be able to make it so the announcements page is the default one when going to the WHMCS Directory (eg - http://www.domain.com/whmcs)? At the moment its the page with all the links on it - however with my template this is not neccesary. Thanks for your help. 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 17, 2008 Share Posted January 17, 2008 Put in the root of your whmcs, create a file called .htaccess If that file put Redirect /index.php http://www.yourwebsite.tld/WHMCS/announcements.php Your site visitors will now be redirected to the announcements page, without being able to see the links from the index page. 0 Quote Link to comment Share on other sites More sharing options...
0 JasonO Posted January 17, 2008 Author Share Posted January 17, 2008 Hi It didn't appear to work. I changed the domain name in the .htaccess file and uploaded it to whmcs root. I have file extensions visible so I know its not a txt file - but going to index.php appears to do nothing for me. 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 17, 2008 Share Posted January 17, 2008 Are you on a linux machine or windows? 0 Quote Link to comment Share on other sites More sharing options...
0 JasonO Posted January 17, 2008 Author Share Posted January 17, 2008 Linux with Apache 2.2.6, PHP 5.2.5, MySQL 5.0.45. 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 That is strange. It should redirect index.php to http://www.yourwebsite.tld/WHMCS/announcements.php without even having to put in the index.php page. Make sure that you chmod it to 677 on the server. Other then that it should work. 0 Quote Link to comment Share on other sites More sharing options...
0 JasonO Posted January 18, 2008 Author Share Posted January 18, 2008 Hmm odd. I tried chmod'ing it to 677 and the index page still loads without redirecting. I've not used htaccess files much so I have no idea how they work. I had a little fiddle like adding quotation marks etc to see if that did anything but nothing. The line I have is this: Redirect /index.php http://www.hosting4network.co.uk/whmcs/announcements.php PS ignore the work in progress design, its been a quick job to see what it would look like keeping the website theme we used to have 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 Ok, try adding RewriteEngine on Redirect /index.php http://www.hosting4network.co.uk/whmcs/announcements.php 0 Quote Link to comment Share on other sites More sharing options...
0 JasonO Posted January 18, 2008 Author Share Posted January 18, 2008 Nothing 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 Ooh, I made a mistake, make sure the .htaccess is chmod 644. 0 Quote Link to comment Share on other sites More sharing options...
0 JasonO Posted January 18, 2008 Author Share Posted January 18, 2008 Still loading the index.php file instead of the announcements. I tried removing the full URL so it only left the file name for the announcements.php file and i got a Server Error - so it's definitly loading the .htaccess file. It's just not processing the redirect. 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 Just as an experiment, can you put in your main website rewriteCond %{HTTP_HOST} ^hosting4network\.co\.uk$ [NC] rewriteRule ^(.*)$ http://www.hosting4network.co.uk/$1 [R=301,L] or rewriteCond %{HTTP_HOST} ^hosting4network\.co.uk$ [NC] rewriteRule ^(.*)$ http://www.hosting4network.co.uk/$1 [R=301,L] Not real sure how the \. system works. I want to see if it will redirect your main site to include a www 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 Ok, that is good news, I am glad to see that it is loading the .htaccess I am still looking to see how to do the redirect. 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 Do you have the Apache Mod-Rewrite moduled enabled? 0 Quote Link to comment Share on other sites More sharing options...
0 JasonO Posted January 18, 2008 Author Share Posted January 18, 2008 So you want one of them in my public_html folder (website root) ? in a .htaccess file? Do you have the Apache Mod-Rewrite moduled enabled? I'll just try and find out Edit : OK Apache2handler has mod_rewrite as a loaded module. 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 Right, in the public_html folder in a .htaccess file. 0 Quote Link to comment Share on other sites More sharing options...
0 JasonO Posted January 18, 2008 Author Share Posted January 18, 2008 OK I've tested both and I couldn't see any visual changes to my front page of my current website or WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 I don't think it would make a difference, but try Redirect 301 /index.php http://www.hosting4network.co.uk/whmcs/announcements.php That is very suspect though that it did not do a rewrite to www. The above code is what apache has in it's documentation, it has worked since 1.3.x Do you have a self managed server os is it fully managed? If it is managed, I would contact the datacenter and ask then to have a tech look and see why it will not do a simple redirect. 0 Quote Link to comment Share on other sites More sharing options...
0 JasonO Posted January 18, 2008 Author Share Posted January 18, 2008 No difference. Yeh it's managed. I will submit a support ticket now then head off to get some sleep. See what I can get from my host. Thanks a lot for your help Brett, I really appreciate it. 0 Quote Link to comment Share on other sites More sharing options...
0 Brett Posted January 18, 2008 Share Posted January 18, 2008 Not a problem Jason, sorry I could not get this to work for you. Have a good nights sleep! 0 Quote Link to comment Share on other sites More sharing options...
Question
JasonO
Hi there
How would I be able to make it so the announcements page is the default one when going to the WHMCS Directory (eg - http://www.domain.com/whmcs)?
At the moment its the page with all the links on it - however with my template this is not neccesary.
Thanks for your help.
Link to comment
Share on other sites
19 answers to this question
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.