PDA

View Full Version : .htaccess file


eboggs_jkvl
12-13-2019, 03:22 PM
Is there a specific location in Vb4 for this file?

I think I need to add a line to it to make the "Calendar" click go to a google calendar but I need to find the darn .htaccess file.

Where the heck is it?

I plan on adding this code:

Redirect 301 /calendar.php http://www.google.com/[your calendar url]

Elmer

Dave
12-13-2019, 03:38 PM
The .htaccess file is not required for vBulletin 4. Generally, it should be located at the root. That is, in the same folder as the login.php, register.php and global.php files.

eboggs_jkvl
12-13-2019, 05:40 PM
Ahso....


So I create the file in the root and put that line of code in it and anyone that clicks on Calendar (calendar.php) will be rerouted to the public Gmail account we are trying to establish for our Car Club Forum?

Elmer

--------------- Added 1576301884 at 1576301884 ---------------

I found out the way to redirect the "Calendar" link to go to a Google Calendar. This allows all of my forum members to access a syncronized calendar that shows all of the activities of my car club forum.

It is accomplished by editing the calendar.php file and redirect the file function to go to the URL of my public google calendar.

The following editing is used to go to my public google calendar:

<?php
/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 4.2.5 - Licence Number VBF1234567
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000-2017 vBulletin Solutions Inc. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # www.vbulletin.com | www.vbulletin.com/license.html # ||
|| ################################################## ################## ||
\*================================================ ======================*/

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'calendar');
define('CSRF_PROTECTION', true);
define('GET_EDIT_TEMPLATES', 'edit,add,manage');

// COMMENT The lines below do the redirect to my public google calendar https url
$redirect_url='https://calendar.google.com/calendar/embed?src=.........america%2FNew_York';
echo '<meta http-equiv="Refresh" content="0; url=' . $redirect_url . '" />';
exit;

All of the rest of the code for the calendar.php is unedited and not read by the calendar.php action. It can be left in the file but it is ignored. I abbreviated my URL code to save space. You would need to put your complete URL code in your edit. To go back to the original file function, you can comment out the added code with "//" or simply remove the added code.



I hope this can help someone that wants to use a synchronized calendar on their VB4 rather than the "stock" vBulletin calendar.


Elmer