Re: [users@httpd] Redirect only a specific index.php page to new location

2018-01-21 Thread Marat Khalili

On 18/01/18 07:53, Kory Wheatley wrote:
When someone types to go to http://sftpinterface/deptblogs/  or a link 
I need it to redirect to http://intranet/template_departments.cfm. 
Which I was able to accomplish in the index.php header content with


http://intranet/template_departments.cfm";);

/* Make sure that code below does not get executed when we redirect. */
exit;
?>

It should work.

But the problem is all pages underneath http://sftpinterface/deptblogs 
redirect to http://intranet/template_departments.cfm. [...]
This shouldn't happen. Most likely there's another redirect rule 
somewhere, e.g. in .htaccess file.


--

With Best Regards,
Marat Khalili


Re: [users@httpd] Redirect only a specific index.php page to new location

2018-01-21 Thread Adam Powell
Have you read this document?
https://httpd.apache.org/docs/trunk/rewrite/avoid.html

-Adam Powell

> On Jan 19, 2018, at 3:33 AM, Luca Toscano  wrote:
> 
> Hi Kory,
> 
> 2018-01-18 5:53 GMT+01:00 Kory Wheatley :
>> When someone types to go to http://sftpinterface/deptblogs/  or a link I 
>> need it to redirect to http://intranet/template_departments.cfm.  Which I 
>> was able to accomplish in the index.php header content with
>> 
>> > /* Redirect browser */
>>  header("Location: http://intranet/template_departments.cfm";);
>> 
>> /* Make sure that code below does not get executed when we redirect. */
>> exit;
>> ?>
>> 
>> But the problem is all pages underneath http://sftpinterface/deptblogs  
>> redirect to  http://intranet/template_departments.cfm.  Like I don't want 
>> http://sftpinterface/deptblogs/nursing to be redirected to 
>> http://intranet/template_departments.cfm.  I want it to stay on that page 
>> along with the others.  Only http://sftpinterface/deptblogs or 
>> http://sftpinterface/deptblogs/index.php  needs to be redirect to  
>> http://intranet/template_departments.cfm and not the sub directory sites 
>> underneath /deptblogs.  What's the possible way of doing this.
>> 
> 
> have you checked 
> https://httpd.apache.org/docs/current/mod/mod_alias.html#redirectmatch ?
> 
> Luca